Operator for NooBaa - object data service for hybrid and multi cloud environments :cloud: :wrench:
*
we have more ways to deploy NooBaa, based on the needs, please refer to noobaa-core repository for more information).NooBaa operator (the Operator) watches for NooBaa changes and reconciles them to apply the desired state.
System Reconciler example - the system reconciliation is divided to the following phases:
Install the latest NooBaa CLI (or pick from the releases page):
OS="linux"
# or
OS="darwin"
ARCH=amd64
# or
ARCH=arm64
VERSION=$(curl -s https://api.github.com/repos/noobaa/noobaa-operator/releases/latest | jq -r '.name')
curl -LO https://github.com/noobaa/noobaa-operator/releases/download/$VERSION/noobaa-operator-$VERSION-$OS-$ARCH.tar.gz
tar -xvzf noobaa-operator-$VERSION-$OS-$ARCH.tar.gz
chmod +x noobaa-operator
mv noobaa-operator /usr/local/bin/noobaa
Install with Mac Homebrew:
brew install noobaa/noobaa/noobaa
Install NooBaa to Kubernetes:
# Prepare namespace and set as current (optional)
kubectl create ns noobaa
kubectl config set-context --current --namespace noobaa
# Install the operator and system on your cluster:
noobaa install
# You can always get system status and information with:
noobaa status
The CLI helps with most management tasks and focuses on ease of use for manual operations or scripts.
Notes:
noobaa --help
noobaa <command> --help
for more information about any command.export KUBECONFIG=/path/to/custom/kubeconfig
or use the --kubeconfig
and --namespace
flags.noobaa install --mini
or --dev
to allocate less resources.noobaa uninstall
Examples:
Here is the top level usage:
1) Help menu
$ noobaa help
# #
# /~~\___~___/~~\ #
# | | #
# \~~|\ /|~~/ #
# \| |/ #
# | | #
# \~~~/ #
# #
# N O O B A A #
Install:
install Install the operator and create the noobaa system
upgrade Upgrade the system, its components and CRDS
uninstall Uninstall the operator and delete the system
status Status of the operator and the system
Manage:
backingstore Manage backing stores
namespacestore Manage namespace stores
bucketclass Manage bucket classes
account Manage noobaa accounts
obc Manage object bucket claims
cosi Manage cosi resources
diagnostics diagnostics of items in noobaa system
sts Manage the NooBaa Security Token Service
Advanced:
operator Deployment using operator
system Manage noobaa systems
api Make api call
bucket Manage noobaa buckets
pvstore Manage noobaa pv store
crd Deployment of CRDs
olm OLM related commands
Other Commands:
completion Generates bash completion scripts
options Print the list of global flags
version Show version
Use "noobaa <command> --help" for more information about a given command.
(taken from branch 5.16)
2) Option menu In case you would like to add flags that are not specific for a certain command.
$ noobaa options
The following options can be passed to any command:
--admission=false: Install the system with admission validation webhook
--autoscaler-type='': The type of autoscaler (hpav2, keda)
--aws-sts-arn='': The AWS STS Role ARN which will assume role
--cosi-driver-path='/var/lib/cosi/cosi.sock': unix socket path for COSI
--cosi-sidecar-image='gcr.io/k8s-staging-sig-storage/objectstorage-sidecar/objectstorage-sidecar:v20221117-v0.1.0-22-g0e67387': The cosi side car container image
--db-image='quay.io/sclorg/postgresql-15-c9s': The database container image
--db-storage-class='': The database volume storage class name
--db-volume-size-gb=0: The database volume size in GB
--debug-level='default_level': The type of debug sets that the system prints (all, nsfs, warn, default_level)
--dev=false: Set sufficient resources for dev env
--disable-load-balancer=false: Set the service type to ClusterIP instead of LoadBalancer
--image-pull-secret='': Image pull secret (must be in same namespace)
--kubeconfig='': Paths to a kubeconfig. Only required if out-of-cluster.
--manual-default-backingstore=false: allow to delete the default backingstore
--mini=false: Signal the operator that it is running in a low resource environment
-n, --namespace='default': Target namespace
--noobaa-image='noobaa/noobaa-core:5.17.0': NooBaa image
--operator-image='noobaa/noobaa-operator:5.17.0': Operator image
--pg-ssl-cert='': ssl cert for postgres (client-side cert - need to be signed by external pg accepted CA)
--pg-ssl-key='': ssl key for postgres (client-side cert - need to be signed by external pg accepted CA)
--pg-ssl-required=false: Force noobaa to work with ssl (external postgres - server-side) [if server cert is self-signed, needs to add --ssl-unauthorized]
--pg-ssl-unauthorized=false: Allow the client to work with self-signed ssl (external postgres - server-side)
--postgres-url='': url for postgresql
--prometheus-namespace='': namespace with installed prometheus for autoscaler
--pv-pool-default-storage-class='': The default storage class name for BackingStores of type pv-pool
--s3-load-balancer-source-subnets=[]: The source subnets for the S3 service load balancer
--show-secrets=false: Show the secrets in the status output
--sts-load-balancer-source-subnets=[]: The source subnets for the STS service load balancer
--test-env=false: Install the system with test env minimal resources
(taken from branch 5.16)
3) Current version
When you want to print the current CLI version and images:
$ noobaa version
INFO[0000] CLI version: 5.17.0
INFO[0000] noobaa-image: noobaa/noobaa-core:5.17.0
INFO[0000] operator-image: noobaa/noobaa-operator:5.17.0
kubectl describe pod | less
kubectl get events --sort-by .metadata.creationTimestamp
kubectl get sc
noobaa install --db-storage-class XXX --pv-pool-default-storage-class YYY
You can find documentation related to noobaa operator and noobaa components in kubernetes in doc directory. For example:
kubectl
, just as they do for built-in resources.
Additional information can be found in:
git clone https://github.com/<username>/noobaa-operator
(see here the full needed procedure when contributing code in Github).minikube start
).go
and python3
.. devenv.sh
.make
.nb
that runs the local operator from build/_output/bin
(alias created by devenv).nb install
.