Volumes
Configuration and usage of encrypted persistent block volumes for Bare Metal CCCO workloads.
The volumes section in the contract manages persistent block volumes for CCCO workloads. CCCO encrypts all attached block volumes to protect data from external access, including OpenShift Container Platform administrators, system administrators, and other data owners. Workload processes run in a Trusted Execution Environment, enabling you to run stateful applications with persistent block storage support.
Overview
To use volumes with CCCO workloads, you must define volume parameters in both the workload and env sections of the contract. CCCO merges these parameters for each persistent block volume, using the provided seeds to encrypt the volume and create the specified mount point to the workload.
Each volume requires a unique label that matches the block device in the pod specification. This label enables CCCO to identify and encrypt the respective persistent block device.
Prerequisites
Before you configure volumes in CCCO:
- Attach physical block devices (such as IBM DASD and IBM Z FCP) to your OpenShift Container Platform bare metal nodes.
- Install a storage operator to manage persistent block volumes (for example, Red Hat OpenShift
Data Foundation (ODF) or Fusion Data Foundation(FDF)).Note: Make that you have enabled the Transport Layer Security (TLS) for ODF or FDF.
- Set up volumes for contracts. For more information, see Setting up volumes for contracts.
Configuration example
The following example shows a single volume configuration across the workload section, env section, and pod specification.
workload:
volumes:
test:
filesystem: "ext4"
mount: "/mnt/data"
seed: "workloadphrase1"env:
volumes:
test:
seed: "envphrase123457"apiVersion: v1
kind: Pod
metadata:
name: busybox-block-storage-pod
namespace: default
spec:
containers:
- name: busybox
image: busybox:latest
command: ["/bin/sh"]
args: ["-c", "while true; do echo 'Block device available'; sleep 30; done"]
volumeDevices:
- name: odf-block-volume
devicePath: /dev/test
volumes:
- name: odf-block-volume
persistentVolumeClaim:
claimName: odf-internal-rbd-pvc-1In this example, the block device name for the container, test, specified
in the devicePath field of the volumeDevices section, matches the
test label defined in both the workload and
env volumes sections. CCCO uses both seeds to encrypt
the volume and creates the mount point at /mnt/data with an ext4 filesystem. The
encrypted storage persists across pod restarts when you use the same contract.