Configuration

Command Line Parameters

This operator accepts the following command line parameters:

product-config

Default value: /etc/stackable/zookeeper-operator/config-spec/properties.yaml

Required: false

Multiple values: false

cargo run -- run --product-config /foo/bar/properties.yaml

watch-namespace

Default value: All namespaces

Required: false

Multiple values: false

The operator will only watch for resources in the provided namespace test:

cargo run -- run --watch-namespace test

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"

Configuration Properties

config-spec Property Actual Property Default Value Recommended Value Location

initLimit

initLimit

5

5

file:zoo.cfg

syncLimit

syncLimit

2

2

file:zoo.cfg

tickTime

tickTime

3000

3000

file:zoo.cfg