Skip to main content

Attach Volumes

Mount storage that survives restarts, or a temporary directory, inside an integration.

How it works​

The setting mounts storages in the integration, each at a path. A persistent storage keeps its content across restarts: it is a PersistentVolumeClaim of the size given, created with the default storage class of the cluster, ReadWriteOnce, and reused when it already exists. A volatile storage is an emptyDir, a temporary directory that lives as long as the instance. Use it when a route writes files.

Persistent storages and replicas

A persistent storage is written from one node at a time (ReadWriteOnce): instances on other nodes cannot mount it.

Prerequisites​

Procedure​

  1. In Runtime Manager, go to Integrations and open the integration.
  2. Choose Add Capability, then Storage: a tab of the overview, next to Compute.
  3. In Storages, give each storage a name and the path it is mounted at, choose Persistent or Volatile, and a size, then add it.
  4. Choose Apply changes.

Parameters​

FieldWhat it isDefault
StoragesEach storage: its name, the path it is mounted at, Persistent or Volatile, and its size.—
SizePersistentVolatile
GivenThe size of the claim created (mount.volumes: name:/path:size:ReadWriteOnce)The size limit of the directory (mount.emptyDirs: name:/path:size)
Left emptyRefused: a persistent storage is always created500Mi, the default of Camel K

Behavior and limits​

  • Applying this setting restarts the integration; it does not rebuild its image.
  • A volatile storage is private to each instance and lost with it.
  • An existing volume cannot be chosen: a persistent storage is the claim of its name, created by Camel K when it does not exist.

See also​