Skip to content

Jooho/nfs-provisioner-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFS Provisioner Operator

Kubernetes operator that deploys an NFS server and provides a StorageClass for dynamic PV provisioning.

What it does

  • Deploys an NFS server pod with flexible storage backend
  • Creates a nfs StorageClass for dynamic PV provisioning (ReadWriteMany)
  • Handles RBAC, ServiceAccount, and SCC (OpenShift) automatically

Quick Start

# Install CRDs
kubectl apply -f config/crd/bases/

# Run operator
make run

# Create NFS server (uses cluster default StorageClass)
kubectl apply -f config/samples/cache_v1alpha1_nfsprovisioner_default_sc.yaml

# Create a PVC using NFS
kubectl apply -f - <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-nfs-claim
spec:
  storageClassName: nfs
  accessModes: [ReadWriteMany]
  resources:
    requests:
      storage: 1Gi
EOF

Storage Modes

Mode CR Spec Use Case
Default SC storageSize: "10Gi" Simplest, recommended
Specific SC scForNFSPvc: "gp3-csi" Choose a StorageClass
Existing PVC pvc: "my-pvc" Reuse existing storage
HostPath hostPathDir: "/data/nfs" Development only

See config/samples/ for example CRs.

Installation

Method Guide
Local development make runquickstart
Cluster deployment make deployquickstart
OLM / OperatorHub operational scripts

Testing

make test           # Unit tests (80%+ coverage)
make test-e2e       # E2E on Kind
make test-e2e-ocp   # E2E on OpenShift
make lint           # Linter

Documentation

Doc Description
Quick Start Install and run without OLM
Architecture Module structure and design
Developer Workflow Skills, testing, release process
Makefile Targets Available make commands
Testing Guide Unit, integration, E2E testing
Operational Scripts hack/scripts workflows
Storage: LocalStorage SC-backed storage setup
Storage: HostPath Node filesystem setup

Project Structure

pkg/
├── validation/    # CR validation
├── defaults/      # Default value application
├── builder/       # Stateless resource construction
├── resources/     # Resource lifecycle managers
└── reconciler/    # Reconciliation orchestration

controllers/       # Thin controller wrapper
catalog/           # File-Based Catalog (FBC) for OLM
test/
├── integration/   # envtest-based tests
└── e2e/           # Kind + OpenShift E2E tests

About

NFS Provisioner Go Operator

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors