Skip to content

nnstd/seaweedfs-operator

 
 

Repository files navigation

SeaweedFS Operator

This Kubernetes Operator is made to easily deploy SeaweedFS onto your Kubernetes cluster.

The difference to seaweedfs-csi-driver is that the infrastructure (SeaweedFS) itself runs on Kubernetes as well (Master, Filer, Volume-Servers) and can as such easily scale with it as you need. It is also by far more resilient to failures than a simple systemD service in regards to handling crashing services or accidental deletes.

Features

  • Automatically deploy and manage a SeaweedFS cluster
  • Ability to be managed by other Operators
  • Compatibility with seaweedfs-csi-driver
  • Auto rolling upgrade and restart
  • Ingress for volume server, filer and S3, to support HDFS, REST filer, S3 API and cross-cluster replication
  • Support all major cloud Kubernetes: AWS, Google, Azure
  • Async backup to cloud storage: S3, Google Cloud Storage, Azure
  • Put warm data to cloud storage tier: S3, Google Cloud Storage, Azure
  • Grafana dashboard
  • Admin UI for cluster management and monitoring
  • BucketClaim for bucket and credentials management

Quick Start

For a quick start guide, see Quick Start Guide.

Installation

For detailed installation instructions, see Installation Guide.

Quick Installation with Helm

helm repo add seaweedfs-operator https://nnstd.github.io/seaweedfs-operator
helm install seaweedfs-operator seaweedfs-operator/seaweedfs-operator

Documentation

Examples

Basic Example

apiVersion: seaweed.seaweedfs.com/v1
kind: Seaweed
metadata:
  name: seaweed1
  namespace: default
spec:
  image: chrislusf/seaweedfs:latest
  storage:
    volumeServerDiskCount: 1
  hostSuffix: seaweed.abcdefg.com
  master:
    replicas: 3
    volumeSizeLimitMB: 1024
  volume:
    replicas: 1
    requests:
      storage: 2Gi
  filer:
    replicas: 2
    config: |
      [leveldb2]
      enabled = true
      dir = "/data/filerldb2"

For more examples, see the wiki.

Development

Follow the instructions in https://sdk.operatorframework.io/docs/building-operators/golang/quickstart/

# install and prepare kind-cluster for development
make kind-prepare

# build the operator image and load the image into Kind cluster
make kind-load

# deploy operator and CRDs
make deploy

# install example of CR
kubectl apply -f config/samples/seaweed_v1_seaweed.yaml

Update the Operator

# rebuild and re-upload image to the kind
make kind-load

# redeploy operator and CRDs
make redeploy

Develop outside of k8s

# register the CRD with the Kubernetes cluster
make install

# run the operator locally outside the Kubernetes cluster
make run ENABLE_WEBHOOKS=false

# From another terminal in the same directory
kubectl apply -f config/samples/seaweed_v1_seaweed.yaml

About

seaweedfs kubernetes operator

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 93.7%
  • Makefile 4.8%
  • Other 1.5%