Skip to content

sharedvolume/shared-volume

Repository files navigation

🚀 Shared Volume

Effortless Kubernetes Volume Sharing & Synchronization

License Kubernetes Stars

Shared Volume is a Kubernetes operator that enables easy sharing of volumes across pods in namespace or cluster scope, with optional data synchronization from external sources.

sharedvolume.github.io

📖 Overview

Shared Volume provides Custom Resource Definitions (CRDs) that allow users to create shared storage solutions in Kubernetes clusters. The operator manages the lifecycle of shared volumes and automatically mounts them to pods through simple annotations.

✨ Key Features

  • 📦 Shared Storage: Create volumes that can be shared across multiple pods
  • 🌐 Namespace & Cluster Scoped: Support for both SharedVolume (sv, namespace-scoped) and ClusterSharedVolume (csv, cluster-scoped) resources
  • 🔄 External Data Sync: Synchronize data from external sources (Git, S3, HTTP, SSH)
  • 🎯 Simple Integration: Mount shared volumes to pods using simple annotations
  • 🛡️ NFS Support: Optional NFS server management for enhanced storage capabilities
  • Zero Configuration: Works out of the box with minimal setup

💡 What is it good for

  • 💾 Efficient Storage Usage: Uses the same storage at the background, keeping only one copy through shared storage approach - reducing storage costs and improving efficiency
  • 🔌 Simplified External Sync: No need to implement custom solutions for syncing external data - just provide the parameters and use it for seamless integration with Git, S3, HTTP, or SSH sources
  • 🔗 Cross-Namespace Volume Sharing: Enables volume sharing across namespace pods using ClusterSharedVolume, breaking traditional namespace boundaries for storage access
  • 🎨 Easy to Use: No need to implement complex details - just add an annotation to your pod and the shared volume is automatically mounted

📚 Documentation

For detailed documentation, installation guides, and examples, visit:

📖 sharedvolume.github.io

🧩 Components

The project consists of several components:

Component Version Repository Description
shared-volume-controller v0.1.0 sharedvolume/shared-volume-controller Main controller managing SharedVolume and ClusterSharedVolume resources
nfs-server-controller v0.1.0 sharedvolume/nfs-server-controller Optional NFS server controller for enhanced storage capabilities
volume-syncer v0.1.0 sharedvolume/volume-syncer Service for synchronizing data from external sources
nfs-server-image v0.1.0 sharedvolume/nfs-server-image Container image for NFS server deployment
shared-volume-helm v0.1.0 sharedvolume/shared-volume-helm Helm charts for easy installation

🚀 Quick Start

flowchart LR
    A[📦 Install] --> B[📝 Create SV] --> C[🏷️ Add Annotation] --> D[🎉 Ready!]
Loading

3 Simple Steps:

📦 Installation

For detailed installation instructions, please visit our Installation Guide.

💻 Basic Usage

  1. Create a SharedVolume (sv):
apiVersion: storage.sharedvolume.io/v1alpha1
kind: SharedVolume
metadata:
  name: my-shared-volume
  namespace: default
spec:
  storage: 1Gi
  mountPath: "/opt/mnt/git-basic"
  syncInterval: "1m"
  syncTimeout: "30s"
  storageClassName: "standard"
  # Optional: sync from external source
  sync:
    source: git
    url: https://github.com/example/repo.git
  1. Use in Pod (supports multiple volumes):
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
  annotations:
    # Mount single SharedVolume
    sharedvolume.sv: "my-shared-volume"
spec:
  containers:
  - name: app
    image: nginx
    # Volumes will be automatically mounted at specified paths

🎯 Use Cases

  • ⚙️ Configuration Sharing: Share configuration files and settings across multiple application pods
  • 📦 Big Size Common Used Data Sharing: Distribute large datasets, models, or assets that need to be accessed by multiple pods
  • 🔄 Sync Data from External: Automatically synchronize and share data from external sources (Git, S3, HTTP, SSH) across your workloads

📋 Requirements

  • Kubernetes v1.24+
  • Go 1.24+ (for development)

🔧 Prerequisites

  • 🛡️ cert-manager: Required for TLS certificate management
  • 💾 csi-driver-nfs/csi-driver-nfs: Required for NFS server functionality

🌐 Community & Support

📄 License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

🙏 Acknowledgments

Thanks to all contributors who have helped make this project possible.


🌟 Star us on GitHub • 🐛 Report Issues • 💬 Join Discussions

GitHub stars GitHub issues GitHub discussions

📖 Documentation⚡ Quick Start🤝 Contributing

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published