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
- An integration, created and bound to an environment.
Procedure
- In Runtime Manager, go to Integrations and open the integration.
- Choose Add Capability, then Storage: a tab of the overview, next to Compute.
- In Storages, give each storage a name and the path it is mounted at, choose Persistent or Volatile, and a size, then add it.
- Choose Apply changes.
Parameters
| Field | What it is | Default |
|---|---|---|
| Storages | Each storage: its name, the path it is mounted at, Persistent or Volatile, and its size. | — |
| Size | Persistent | Volatile |
|---|---|---|
| Given | The size of the claim created (mount.volumes: name:/path:size:ReadWriteOnce) | The size limit of the directory (mount.emptyDirs: name:/path:size) |
| Left empty | Refused: a persistent storage is always created | 500Mi, 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
- Integrations: every setting at a glance