seaweedfs kubernetes operator
Go to file
2021-06-25 01:55:10 -07:00
.github/workflows Create main.yml 2021-05-06 11:04:02 -07:00
api/v1 add ingress for volume servers 2020-11-10 00:11:17 -08:00
config 2.54 2021-06-19 03:57:23 -07:00
controllers 2.54 2021-06-19 03:57:23 -07:00
hack Add verify codegen and manifests 2020-10-30 05:15:18 +00:00
.gitignore aux files 2020-07-26 14:50:48 -07:00
.travis.yml Create .travis.yml 2021-06-09 12:22:10 -07:00
Dockerfile simple change to test travis build 2021-06-09 12:32:27 -07:00
go.mod remove redis from go.mod 2021-04-26 00:25:46 +08:00
go.sum remove redis from go.mod 2021-04-26 00:25:46 +08:00
main.go detect ENABLE_WEBHOOKS!=false 2020-11-03 20:24:19 -08:00
Makefile update 2021-04-25 13:34:01 +08:00
PROJECT Add instructions for end-user deployment 2020-11-15 11:18:19 +08:00
README.md Update README.md 2021-06-25 10:17:25 +02:00
seaweedfs-operator.iml Update seaweedfs-operator.iml 2021-02-25 08:25:10 -08:00

Build Status

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 resilent to failures then a simple systemD service in regards to handling crashing services or accidental deletes.

By using make deploy it will deploy a Resource of type 'Seaweed' onto your current kubectl $KUBECONFIG target (the operator itself) which by default will do nothing unless you configurate it (see examples in config/samples/).

Goals:

  • Automatically deploy and manage a SeaweedFS cluster.
  • Ability to be managed by other Operators.
  • Compability 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.
  • Scheduled backup to cloud storage: S3, Google Cloud Storage , Azure.
  • Put warm data to cloud storage tier: S3, Google Cloud Storage , Azure.
  • Grafana dashboard.

Installation

This operator uses kustomize to deploy. The installation process will install one for you if you do not have one.

By default, the defaulting and validation webhooks are disabled. We strongly recommend that the webhooks be enabled.

First clone the repository:

$ git clone https://github.com/seaweedfs/seaweedfs-operator --depth=1

To deploy the operator with webhooks enabled, make sure you have installed the cert-manager(Installation docs: https://cert-manager.io/docs/installation/) in your cluster, then follow the instructions in the config/default/kustomization.yaml file to uncomment the components you need.

Lastly, change the value of ENABLE_WEBHOOKS to "true" in config/manager/manager.yaml

Afterwards fire up:

$ make install

Then run the command to deploy the operator into your cluster:

$ make deploy

Verify if it was correctly deployed with:

$ kubectl get Seaweed --all-namespaces

Which should return:

NAMESPACE   NAME      AGE
seaweed     seaweed   1h

See the next section for example usage

Configuration Examples

Maintenance and Uninstallation

  • TBD

Development

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

$ git clone https://github.com/seaweedfs/seaweedfs-operator
$ cd seaweedfs-operator

# register the CRD with the Kubernetes
$ make deploy

# build the operator image
$ make docker-build

# load the image into Kind cluster
$ kind load docker-image chrislusf/seaweedfs-operator:v0.0.1

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

Update the operator

# delete the existing operator
$ kubectl delete namespace seaweedfs-operator-system

# rebuild the operator image
$ make docker-build

# load the image into Kind cluster
$ kind load docker-image chrislusf/seaweedfs-operator:v0.0.1

# register the CRD with the Kubernetes
$ make deploy

develop outside of k8s

$ git clone https://github.com/seaweedfs/seaweedfs-operator
$ cd seaweedfs-operator

# register the CRD with the Kubernetes
$ 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