zfs-operator

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

zfs-operator

envtest

zfs-operator is a light-weight Kubernetes Operator that operates ZFS Dataset on Node (currently only ZVOL).

Architecture

zfs-operator manages zfs datasets using zfs cli, so this operator should be placed on each nodes.

Concepts

Volume

Volume is a representation of ZVOL.

apiVersion: zfs.unstable.cloud/v1alpha1
kind: Volume
metadata:
  name: volume-sample
spec:
  nodeName: node01
  volumeName: "tank/sample"
  capacity:
    storage: 5Gi
  properties:
    key: value

Installation

zfs-operator runs within your Kubernetes cluster as a series of daemonset resources. It utilizes CustomResourceDefinitions to configure zfs datasets.

It is deployed using regular YAML manifests, like any other application on Kubernetes.

$ kubectl kustomize "github.com/yuanying/zfs-operator.git/config/default?ref=master" | kubectl apply -f -

Usually, there are only a few nodes where you want to install zfs-operator to manage zfs dataset. This manifest assumes such cases. Please label your node where you want to install this operator like following.

$ kubectl label node ${ZFS_NODE} zfs.unstable.cloud/storage=

If zfs-operator is installed successfully, you can see some pods in zfs-operator-system namespace like this.

$ kubectl get pod -o wide
NAME                          READY   STATUS    RESTARTS   AGE   IP            NODE            NOMINATED NODE   READINESS GATES
zfs-operator-zfs-node-74wkf   2/2     Running   42         11d   10.244.1.10   ${ZFS_NODE}     <none>           <none>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the zfs v1alpha1 API group +kubebuilder:object:generate=true +groupName=zfs.unstable.cloud +kubebuilder:validation:Optional
Package v1alpha1 contains API Schema definitions for the zfs v1alpha1 API group +kubebuilder:object:generate=true +groupName=zfs.unstable.cloud +kubebuilder:validation:Optional

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL