Configuration
Command Line Parameters
Environment variables
This operator accepts the following environment variables:
PRODUCT_CONFIG
Default value: /etc/stackable/zookeeper-operator/config-spec/properties.yaml
Required: false
Multiple values: false
export PRODUCT_CONFIG=/foo/bar/properties.yaml
cargo run -- run
or via docker:
docker run \ --name zookeeper-operator \ --network host \ --env KUBECONFIG=/home/stackable/.kube/config \ --env PRODUCT_CONFIG=/my/product/config.yaml \ --mount type=bind,source="$HOME/.kube/config",target="/home/stackable/.kube/config" \ docker.stackable.tech/stackable/zookeeper-operator:latest
WATCH_NAMESPACE
Default value: All namespaces
Required: false
Multiple values: false
The operator will only watch for resources in the provided namespace test
:
export WATCH_NAMESPACE=test
cargo run -- run
or via docker:
docker run \
--name zookeeper-operator \
--network host \
--env KUBECONFIG=/home/stackable/.kube/config \
--env WATCH_NAMESPACE=test \
--mount type=bind,source="$HOME/.kube/config",target="/home/stackable/.kube/config" \
docker.stackable.tech/stackable/zookeeper-operator:latest
Kubernetes custom resource options
The cluster can be configured via a YAML file. This custom resource specifies the amount of replicas for each role group or role specific configuration like port definitions etc.
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperCluster
metadata:
name: simple
spec:
image:
productVersion: 3.8.3
servers:
roleGroups:
default:
selector:
matchLabels:
kubernetes.io/os: linux
# Here you can set the Stackable supported configuration parameters
# See the documentation for a full list of the exposed configuration parameters
config:
tickTime: 3000
# You can also override properties in a configuration file here
configOverrides:
zoo.cfg:
4lw.commands.whitelist: 'srvr,ruok,isro'
# Set environment variables here
envOverrides:
MY_ENV_VAR: "foobar"