feat(dispatch) add enabled flags for the components. Separate secrets so that they can be referenced in each chart. Add a few initial notes.

This commit is contained in:
Tommy 2023-12-16 14:59:22 +01:00
parent 542a00b1b8
commit cde310d6bc
No known key found for this signature in database
7 changed files with 30 additions and 23 deletions

View file

@ -1,4 +1,4 @@
apiVersion: v2
name: dispatch
description: Netflix Dispatch incident management system
version: 0.1.5
version: 0.1.6

View file

@ -1 +1,9 @@
NOTES.txt
This is Netflix Dispatch, an unofficial Helm Chart.
The chart has three components:
* core:
* scheduler:
* web:
More info: https://netflix.github.io/dispatch/

View file

@ -1,8 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "dispatch.fullname" . }}-config
data:
POSTGRES_HOSTNAME: {{ .Values.postgres.hostname | quote }}
POSTGRES_DATABASE_NAME: {{ .Values.postgres.database_name | quote }}
POSTGRES_PORT: {{ .Values.postgres.port | quote }}

View file

@ -1,3 +1,4 @@
{{- if .Values.core.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -26,7 +27,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: {{ .Values.core.container.command }}
envFrom:
- configMapRef:
name: {{ include "dispatch.fullname" . }}-config
- secretRef:
name: {{ .Values.core.secretRef.name }}
name: {{ .Values.core.container.envFrom.secretRef.name }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.scheduler.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -20,7 +21,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: {{ .Values.scheduler.command }}
envFrom:
- configMapRef:
name: {{ include "dispatch.fullname" . }}-config
- secretRef:
name: {{ .Values.scheduler.secretRef.name }}
name: {{ .Values.scheduler.container.envFrom.secretRef.name }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.scheduler.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -26,7 +27,6 @@ spec:
ports:
- containerPort: {{ .Values.web.container.port }}
envFrom:
- configMapRef:
name: {{ include "dispatch.fullname" . }}-config
- secretRef:
name: {{ .Values.web.secretRef.name }}
name: {{ .Values.web.container.envFrom.secretRef.name }}
{{- end }}

View file

@ -13,23 +13,30 @@ initContainers:
name: dispatch-secret
core:
enabled: true
secretRef:
name: dispatch-secret
web:
enabled: true
container:
port: 8000
command: ["dispatch", "server", "start", "dispatch.main:app", "--host=0.0.0.0"]
secretRef:
name: dispatch-secret
envFrom:
secretRef:
name: dispatch-secret
service:
type: ClusterIP
port: 80
scheduler:
enabled: true
command: ["dispatch", "scheduler", "start"]
secretRef:
name: dispatch-secret
container:
command: ["dispatch", "scheduler"]
envFrom:
secretRef:
name: dispatch-secret
postgres:
hostname: "postgres-rw.databases.svc.cluster.local"