Skip to content

    API Storage

    This page describes how to configure storage for the API during installation.

    Data stored by the API

    The API stores and caches the following data:

    • Event Hub Topics: Topics fetched from EventHubs are stored and cached for performance reasons.
    • Backup Metrics: The API stores metrics from backups. See Backup Metrics for more information.
    • Restore Metrics: The API stores metrics from restores. See Restore Metrics for more information.

    This list may change in future versions.

    Configuring the data directory

    By default, the data directory is located at /var/lib/kannika in the API container.

    To configure the data directory, set the api.config.data.directory application property.

    values.yaml
    api:
    config:
    data:
    directory: /var/lib/kannika

    Configuring the data volume

    A data volume is mounted to the data directory to store the API data.

    By default, this volume is an emptyDir . This means that data is not persisted across container restarts.

    Persistent volume

    To use a persistent volume to store the API data, set the api.storage.persistentVolume.enabled property to true. This will create a PersistentVolumeClaim .

    This is the recommended configuration for production environments.

    The following properties can be configured:

    values.yaml
    api:
    storage:
    persistentVolume:
    enabled: true
    storageClass: "default"
    size: 5Gi
    labels: {}
    annotations: {}
    accessModes:
    - ReadWriteOnce
    nameOverwrite: ""

    Host path

    To store the API data on the host, set the api.storage.hostPath property to an absolute path on the host. This will create a hostPath . volume.

    This is useful for development and testing environments, but it is not recommended for production environments.

    values.yaml
    api:
    storage:
    hostPath: /var/lib/kannika