Configuring Persistent Data for Pipeline Components
The pipelines' internal Docker registry and the Minio workloads use ephemeral volumes by default. This default storage works out-of-the-box and makes testing easy, but you lose the build images and build logs if the node running the Docker Registry or Minio fails. In most cases this is fine. If you want build images and logs to survive node failures, you can configure the Docker Registry and Minio to use persistent volumes.
This section assumes that you understand how persistent storage works in Kubernetes. For more information, refer to the section on how storage works.
Prerequisites (for both parts A and B):
Persistent volumes must be available for the cluster.
A. Configuring Persistent Data for Docker Registry
From the project that you're configuring a pipeline for, and click Resources > Workloads. In versions before v2.3.0, select the Workloads tab.
Find the
docker-registry
workload and select ⋮ > Edit.Scroll to the Volumes section and expand it. Make one of the following selections from the Add Volume menu, which is near the bottom of the section:
- Add Volume > Add a new persistent volume (claim)
- Add Volume > Use an existing persistent volume (claim)
Complete the form that displays to choose a persistent volume for the internal Docker registry.
- Add a new persistent volume
- Use an existing persistent volume
- Enter a Name for the volume claim.
- Select a volume claim Source:
- If you select Use a Storage Class to provision a new persistent volume, select a storage class and enter a Capacity.
- If you select Use an existing persistent volume, choose a Persistent Volume from the drop-down.
- From the Customize section, choose the read/write access for the volume.
- Click Define.
- Enter a Name for the volume claim.
- Choose a Persistent Volume Claim from the drop-down.
- From the Customize section, choose the read/write access for the volume.
- Click Define.
From the Mount Point field, enter
/var/lib/registry
, which is the data storage path inside the Docker registry container.Click Upgrade.
B. Configuring Persistent Data for Minio
From the project view, click Resources > Workloads. (In versions before v2.3.0, click the Workloads tab.) Find the
minio
workload and select ⋮ > Edit.Scroll to the Volumes section and expand it. Make one of the following selections from the Add Volume menu, which is near the bottom of the section:
- Add Volume > Add a new persistent volume (claim)
- Add Volume > Use an existing persistent volume (claim)
Complete the form that displays to choose a persistent volume for the internal Docker registry.
- Add a new persistent volume
- Use an existing persistent volume
- Enter a Name for the volume claim.
- Select a volume claim Source:
- If you select Use a Storage Class to provision a new persistent volume, select a storage class and enter a Capacity.
- If you select Use an existing persistent volume, choose a Persistent Volume from the drop-down.
- From the Customize section, choose the read/write access for the volume.
- Click Define.
- Enter a Name for the volume claim.
- Choose a Persistent Volume Claim from the drop-down.
- From the Customize section, choose the read/write access for the volume.
- Click Define.
From the Mount Point field, enter
/data
, which is the data storage path inside the Minio container.Click Upgrade.
Result: Persistent storage is configured for your pipeline components.