chore(dispatch) restructuring values

This commit is contained in:
Tommy 2023-12-16 16:49:16 +01:00
parent b2d107839f
commit c066b695cd
No known key found for this signature in database
6 changed files with 41 additions and 26 deletions

View file

@ -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.1 version: 0.2.2

View file

@ -25,8 +25,15 @@ spec:
- name: core - name: core
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: {{ .Values.core.container.command }} env:
env: {{ .Values.core.container.env }} - 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: envFrom:
- secretRef: - secretRef:
name: {{ .Values.envFromSecret }} name: {{ .Values.envFromSecret }}

View file

@ -19,8 +19,16 @@ spec:
- name: scheduler - name: scheduler
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: {{ .Values.scheduler.container.command }} command: ["dispatch", "scheduler", "start"]
env: {{ .Values.scheduler.container.env }} env:
- 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: envFrom:
- secretRef: - secretRef:
name: {{ .Values.envFromSecret }} name: {{ .Values.envFromSecret }}

View file

@ -19,14 +19,23 @@ spec:
- name: web-db-init - name: web-db-init
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ["dispatch", "web", "database", "init"] command: ["dispatch", "web", "database", "init"]
containers: containers:
- name: web - name: web
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: {{ .Values.web.container.command }} command: ["dispatch", "server", "start", "dispatch.main:app", "--host=0.0.0.0"]
ports: ports:
- containerPort: {{ .Values.web.container.port }} - containerPort: 8000
env: {{ .Values.web.container.env }} env:
- 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: envFrom:
- secretRef: - secretRef:
name: {{ .Values.envFromSecret }} name: {{ .Values.envFromSecret }}

View file

@ -8,7 +8,7 @@ spec:
type: {{ .Values.web.service.type }} type: {{ .Values.web.service.type }}
ports: ports:
- port: {{ .Values.web.service.port }} - port: {{ .Values.web.service.port }}
targetPort: {{ .Values.web.container.port }} targetPort: 8000
protocol: TCP protocol: TCP
selector: selector:
app: {{ include "dispatch.fullname" . }}-web app: {{ include "dispatch.fullname" . }}-web

View file

@ -1,4 +1,4 @@
envFromSecret: dispatch-secret envFromSecret: *secret dispatch-secret
image: image:
repository: ghcr.io/tommy-skaug/dispatch repository: ghcr.io/tommy-skaug/dispatch
@ -12,34 +12,25 @@ initContainers:
tag: "16" tag: "16"
envFrom: envFrom:
- secretRef: - secretRef:
name: dispatch-secret name: &secret
url: http://localhost:80
core: core:
enabled: true enabled: true
container:
env: []
web: web:
enabled: true enabled: true
container:
port: 8000
command: ["dispatch", "server", "start", "dispatch.main:app", "--host=0.0.0.0"]
env: []
service: service:
type: ClusterIP type: ClusterIP
port: 80 port: 80
scheduler: scheduler:
enabled: true enabled: true
container:
command: ["dispatch", "scheduler", "start"]
env: []
postgres: postgres:
hostname: "postgres-rw.databases.svc.cluster.local" hostname: "postgres-rw.databases.svc.cluster.local"
database_name: "postgres" database_name: "dispatch"
port: "5432" port: "5432"
secretRef: secretRef:
name: dispatch-secret name: &secret