Skip to content

csi_intro

Aleix Ramírez edited this page Sep 3, 2025 · 4 revisions

Overview

This repository contains an implementation of a Container Storage Interface (CSI) driver for Kubernetes on OpenNebula environments, adding the ability to define persistent volumes in CAPONE clusters

Kubernetes communicates with the driver through gRPC endpoints that provide three CSI services:

  • Controller Service: A centralized component responsible for provisioning, attaching, and deleting volumes.
  • Node Service: Handles volume publishing on the node where the storage volume is provisioned.
  • Identity Service: Reports plugin capabilities, health, and metadata.

A Headless Plugin deployment is used, where the Controller and Node services are combined into a single component.

Depending on the injected sidecars, the plugin executes either the Controller or Node Server functionality. The gRPC server includes all service listeners, but only those associated with the active sidecars are used.

                                 CAPONE Node
+-------------------------------------------+
|  +------------+           +------------+  |
|  |    K8s     |   gRPC    |    CSI     |  |
|  |            +----------->  Services  |  |
|  +------------+           +------------+  |
+-------------------------------------------+

Access and Volume Modes

The driver supports the following modes for PersistentVolumes:

  • Access Modes:
    • ReadWriteOnce (RWO): The volume can be mounted as read-write by a single node.
    • ReadOnlyMany (ROX): The volume can be mounted as read-only by multiple nodes.
  • Volume Modes:
    • Filesystem: The volume is formatted with a filesystem and can be mounted by pods.
    • Block: The volume is exposed as a raw block device for direct use by applications.

StorageClasses

The driver provides several predefined StorageClasses for the csi.opennebula.io provider:

Name Type Reclaim Policy
opennebula-storage Block Delete
opennebula-storage-preserve Block Retain
opennebula-fs Filesystem Delete
opennebula-fs-preserve Filesystem Retain

Internally, each of these StorageClasses is backed by an OpenNebula persistent image disk attached to a Kubernetes node VM. For the filesystem-backed StorageClasses (opennebula-fs and opennebula-fs-preserve), the default fsType is ext4.

Clone this wiki locally