Configuration
Command Line Parameters
Environment variables
This operator accepts the following environment variables:
PRODUCT_CONFIG
Default value: /etc/stackable/kafka-operator/config-spec/properties.yaml
Required: false
Multiple values: false
export PRODUCT_CONFIG=/foo/bar/properties.yaml
stackable-kafka-operator run
or via docker:
docker run \
    --name kafka-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/kafka-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
stackable-kafka-operator run
or via docker:
docker run \
--name kafka-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/kafka-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, role group or role specific configuration like port definitions etc.
apiVersion: kafka.stackable.tech/v1alpha1
kind: KafkaCluster
metadata:
  name: simple-kafka
spec:
  image:
    productVersion: 3.4.0
    stackableVersion: "0.0.0-dev"
  zookeeperConfigMapName: simple-kafka-znode
  brokers:
    roleGroups:
      default:
        replicas: 1
Structure
There are three levels of configuration:
Common shared options  | 
Contains configuration that is shared within the whole cluster ensemble. E.g., version, image, encryption or logging.  | 
Role options  | 
This configuration is shared for all roles of a certain type (in this operator, only the Broker role).  | 
RoleGroup options  | 
Options provided in the role group apply to each created "pod".  | 
Common shared options
Name  | 
Type  | 
Description  | 
Related Kafka properties  | 
version  | 
string  | 
The Kafka version used in the format: x.y.z-stackableX.Y.Z  | 
|
zookeeperConfigMapName  | 
string  | 
A reference to a ConfigMap containing a connection string for connecting to a ZooKeeper cluster  | 
|
opa  | 
struct  | 
An OPA configuration for Kafka, consisting of an OPA reference (namespace, name) and some authorizer properties  |