Using Additional Configuration Parameters for the Redpanda Operator

 Deprecated red

The Cluster and Console resources are deprecated. For details, see the deprecation notice. To migrate to the Redpanda resource, see Migrate from Cluster and Console Custom Resources

After the Redpanda operator is installed, you can create a Redpanda cluster by applying a cluster Custom Resource (CR) that contains the specification of the desired Redpanda cluster. The CR includes the Redpanda cluster name, namespace, and configuration for the Admin API, Kafka API, HTTP Proxy API, and others.

The cluster definition includes commonly used cluster and node properties. To add other node properties, you can specify any node property in the node configuration template by using the additionalConfiguration property.

The additionalConfiguration property lets you add properties not included in the CR. For example, consider the single-node sample found in the sample files with additionalConfiguration added:

Sample configuration

apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
metadata:
  name: one-node-cluster
spec:
  image: "redpandadata/redpanda"
  version: "latest"
  replicas: 1
  resources:
    requests:
      cpu: 1
      memory: 1.2Gi
    limits:
      cpu: 1
      memory: 1.2Gi
  configuration:
    rpcServer:
      port: 33145
    kafkaApi:
    - port: 9092
    pandaproxyApi:
    - port: 8082
    adminApi:
    - port: 9644
    developerMode: true
  additionalConfiguration:
    pandaproxy_client.retries: "10"
    schema_registry.schema_registry_api: "[{'name':'external','address':'0.0.0.0','port':8081}]"

You may also set additional configuration properties at the cluster level, if you set the enable_idempotency property to true:

rpk cluster config set enable_idempotence true

To define the default_topic_partitions property with a new value:

rpk cluster config set default_topic_partitions 3

The additionalConfiguration map includes parameters that are not part of the Custom Resource, but are passed to the redpanda.yaml configuration file.

The format of each entry is <subsystem>.<property_name>: <value>. Examples of subsystems are redpanda, pandaproxy_client, and schema_registry. The value can be a single value or a YAML/JSON-encoded string, as is the case with the schema_registry parameter in the example.

After the specification is applied, the Redpanda logs should include the following:

 pandaproxy_client:
  ..
  retries: 10
redpanda:
  ..
  default_topic_partitions: 3
  enable_idempotence: true
  ..
...
schema_registry:
  schema_registry_api:
    - address: 0.0.0.0
      name: external
      port: 8081

To verify the values for the cluster configuration:

rpk cluster config get enable_idempotence
true

or

rpk cluster config get default_topic_partitions
3

Limitations

  • Versioning is not supported for the additionalConfiguration parameters.

  • Key names not supported by Redpanda lead to failure on startup.

  • Updating this map requires a manual restart of the Redpanda pods.