Database
Mission Control stores all state in a Postgres Database, by default a Postgres StatefulSet is created.
Configuring the default Statefulset
values.yamldb:
create: true
conf: # override postgres.conf settings
secretKeyRef: # auto-generated if it doesn't exist
name: incident-commander-postgres
key: DB_URL
storageClass: # optional storage class for PVC volume
storage: 20Gi
shmVolume: 256Mi # size of shm memory file to be mounted
resources: # resources to assign to the postgres database pod
requests:
memory: 4Gi
The database password can then be retrieved using
kubectl get secret incident-commander-postgres -o json | jq -r '.data.POSTGRES_PASSWORD' | base64 -d
Connecting
If you ever need to connect to the database, you can do so by forwarding the port:
kubectl port-forward svc/postgres 5432:5432
psql -U postgres localhost -p 5432 mission_control
Updating postgres.conf settings
Using an External Database
In order to connect to an existing database a secret needs to be created with the following key:
DB_URL
The following keys are required for kratos:
DB_HOST
DB_NAME
DB_USERNAME
DB_PASSWORD
values.yamldb:
create: false
secretKeyRef: # auto-generated if it doesn't exist
name: mission-control-postgres
key: DB_URL