The StorageOS Operator deploys and configures a StorageOS cluster on Kubernetes.
- Build operator container image with
make operator-image
. Publish or copy the container image to an existing k8s cluster to make it available for use within the cluster. - Generate install manifest file with
make install-manifest
. This will generatestorageos-operator.yaml
file. - Install the operator with
kubectl create -f storageos-operator.yaml
.
The operator can also be run from outside the cluster with make run
. Ensure
the CRDs that the operator requires are installed in the cluster before running
it using make install
.
- Ensure an etcd cluster is available to be used with StorageOS.
- Create a secret for the cluster, for example:
apiVersion: v1
kind: Secret
metadata:
name: storageos-api
namespace: storageos
labels:
app: storageos
data:
# echo -n '<secret>' | base64
username: c3RvcmFnZW9z
password: c3RvcmFnZW9z
- Create a
StorageOSCluster
custom resource in the same namespace as the above secret and refer the secret in the spec:
apiVersion: storageos.com/v1
kind: StorageOSCluster
metadata:
name: storageoscluster-sample
namespace: storageos
spec:
secretRefName: storageos-api
storageClassName: storageos
kvBackend:
address: "<etcd-address>"
This will create a StorageOS cluster in storageos
namespace with a
StorageClass storageos
that can be used to provision StorageOS volumes.
Run the unit tests with make test
.
Run e2e tests with make e2e
. e2e tests use kuttl.
Install kuttl kubectl plugin before running the e2e tests.
Api-manager manifests are stored in the repo but updated manually. To update the manifests please follow the instructions below.
- Edit
API_MANAGER_VERSION
inMakefile
or pass it to make target. - Execute
make api-manager
command. - Enjoy new version.
portal-manager manifests are stored in the repo but updated manually. To update the manifests please follow the instructions below.
- Edit
PORTAL_MANAGER_VERSION
inMakefile
or pass it to make target. - Execute
make portal-manager
command. - Enjoy new version.
node-manager manifests are stored in the repo but updated manually. To update the manifests please follow the instructions below.
- Edit
NODE_MANAGER_VERSION
inMakefile
or pass it to make target. - Execute
make node-manager
command. - Enjoy new version.