Persistence Chaos Dashboard
This document describes how to make Chaos Dashboard persistence.
Chaos Dashboard support
PostgreSQL as database backends for persistence.
Chaos Dashboard uses
SQLite as the default database engine, and it is recommended to enable PV (Persistent Volumes). To enable PV, set
true. You can find related configurations on
value.yaml as follows:
# If you are using SQLite as your DB for Chaos Dashboard, it is recommended to enable persistence.
# If enable, the chart will create a PersistenceVolumeClaim to store its state in. If you are
# using a DB other than SQLite, set this to false to avoid allocating unused storage.
# If set to false, Chaos Mesh will use an emptyDir instead, which is ephemeral.
# If you'd like to bring your own PVC for persisting chaos event, pass the name of the
# created + ready PVC here. If set, this Chart will not create the default PVC.
# Requires server.persistentVolume.enabled: true
# Chaos Dashboard data Persistent Volume size.
# Chaos Dashboard data Persistent Volume Storage Class.
# If defined, storageClassName: <storageClass>
# Chaos Dashboard data Persistent Volume mount root path
# Subdirectory of Chaos Dashboard data Persistent Volume to mount
# Useful if the volume's root directory is not empty
If Chaos Dashboard component restarts without PV, the data of Chaos Dashboard will be lost and can't be retrieved.
Chaos Dashboard supports MySQL 5.6 and higher versions as the database engine. The below example demonstrates MySQL database configuration. For details about connection string configuration, refer to the MySQL-Driver for Go.
Chaos Dashboard supports PostgreSQL 9.6 and higher versions as the database engine. The below example demonstrates PostgreSQL database configuration. For details about connection string configuration, refer to libpq connect.
Set TTL (Time To Live) for Chaos Dashboard data
Chaos Dashboard supports setting the expiration time of Chaos Dashboard data. The default
Event related data expires by
168h, and the
Experiment related data defaults to
336h. If you need to modify it, you can set
dashboard.env.TTL_EXPERIMENT parameters, like: