Convert all 15 cluster services from embedded API format to wild-directory packages using the unified manifest format: - metallb, traefik, cert-manager, longhorn, snapshot-controller - nfs, smtp, coredns, node-feature-discovery, nvidia-device-plugin - externaldns, docker-registry, headlamp, crowdsec, utils Changes: - wild-manifest.yaml → manifest.yaml with is, defaultConfig, requires - Eliminated configReferences and serviceConfig fields - Flattened kustomize.template/ to package root - Template vars use flat defaultConfig keys - install.sh paths updated for apps/ layout - Updated 9 app manifests: cloud.smtp.* → apps.smtp.* with requires - Removed dead install: true field from 6 app manifests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
49 lines
1.6 KiB
Markdown
49 lines
1.6 KiB
Markdown
# Snapshot Controller
|
|
|
|
The snapshot controller is a Kubernetes component that manages the lifecycle of volume snapshots. It works in conjunction with CSI drivers to enable backup and restore functionality for persistent volumes.
|
|
|
|
## Architecture
|
|
|
|
The snapshot functionality in Kubernetes is split into two components:
|
|
- **Snapshot Controller** (this service): Cluster-wide controller that manages VolumeSnapshot resources
|
|
- **CSI Snapshotter Sidecar**: Deployed with each CSI driver (e.g., Longhorn) to perform actual snapshot operations
|
|
|
|
## Installation
|
|
|
|
This service is installed automatically by Wild Cloud when setting up cluster services. It deploys:
|
|
- The snapshot-controller deployment (2 replicas with leader election)
|
|
- Required RBAC permissions
|
|
- VolumeSnapshot CRDs (if not already present)
|
|
|
|
## Dependencies
|
|
|
|
- Requires a CSI driver with snapshot support (e.g., Longhorn)
|
|
- Requires VolumeSnapshot CRDs (included with this service)
|
|
|
|
## Verification
|
|
|
|
After installation, verify the controller is running:
|
|
```bash
|
|
kubectl get pods -n kube-system | grep snapshot-controller
|
|
kubectl api-resources | grep snapshot
|
|
```
|
|
|
|
## Usage
|
|
|
|
Once installed, you can create VolumeSnapshots for any PVC managed by a CSI driver:
|
|
```yaml
|
|
apiVersion: snapshot.storage.k8s.io/v1
|
|
kind: VolumeSnapshot
|
|
metadata:
|
|
name: my-snapshot
|
|
namespace: default
|
|
spec:
|
|
volumeSnapshotClassName: longhorn-snapshot-class
|
|
source:
|
|
persistentVolumeClaimName: my-pvc
|
|
```
|
|
|
|
## References
|
|
|
|
- [Kubernetes CSI Snapshot Documentation](https://kubernetes-csi.github.io/docs/snapshot-restore-feature.html)
|
|
- [External Snapshotter GitHub](https://github.com/kubernetes-csi/external-snapshotter) |