Configurations

The following configuration options can be set on the Charmed Apache Kafka charm using juju config.

Name

Type

Default

Description

roles

string

broker

Comma separated list of the roles assigned to the nodes of this cluster. This configuration accepts the following roles: ‘broker’ (standard functionality), ‘balancer’ (cruise control), ‘controller’ (KRaft mode).

tls-private-key

string

User-provided secret ID which defines internal TLS/SSL private-key to be used by individual brokers in the Apache Kafka cluster. The secret ID format is like “secret:cvh7kruupa1s46bqvuig” and should not be confused with secret name or label. The secret could be defined using juju add-secret <secret-name> <unit-name>=<tls-private-key> command, where <unit-name> is the Juju unit-id for a specific Kafka unit with a hyphen, e.g kafka/3 -> kafka-3. tls-private-key can be raw-string, or base64 encoded. The juju add-secret command will output the secret ID, which can then be granted to the charm and configured using juju config command.

system-users

string

User-provided secret ID which defines internal username/passwords on the Apache Kafka cluster. The secret ID format is like “secret:cvh7kruupa1s46bqvuig” and should not be confused with secret name or label. The secret could be defined using juju add-secret <secret-name> <user>=<admin-password> command, where <user> is one of the internal users defined by the charm: sync or admin. The juju add-secret command will output the secret ID, which can then be granted to the charm and configured using juju config command.

compression-type

string

producer

Specify the final compression type for a given topic. This configuration accepts the standard compression codecs (‘gzip’, ‘snappy’, ‘lz4’, ‘zstd’). It additionally accepts ‘uncompressed’ which is equivalent to no compression; and ‘producer’ which means retain the original compression codec set by the producer.

log-flush-interval-messages

string

9223372036854775807

The number of messages accumulated on a log partition before messages are flushed to disk.

log-flush-interval-ms

string

9223372036854775807

The maximum time in ms that a message in any topic is kept in memory before flushed to disk.

log-flush-offset-checkpoint-interval-ms

int

60000

The frequency with which we update the persistent record of the last flush which acts as the log recovery point.

log-retention-bytes

string

-1

The maximum size of the log before deleting it.

log-retention-ms

string

-1

The number of milliseconds to keep a log file before deleting it (in milliseconds).

log-segment-bytes

int

1073741824

The maximum size of a single log file.

message-max-bytes

int

1048588

The largest record batch size allowed by Apache Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers’ fetch size must also be increased so that they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.This can be set per topic with the topic level max.message.bytes config.

offsets-topic-num-partitions

int

50

The number of partitions for the offset commit topic (should not change after deployment).

transaction-state-log-num-partitions

int

50

The number of partitions for the transaction topic (should not change after deployment).

unclean-leader-election-enable

boolean

false

Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.

log-cleaner-delete-retention-ms

string

86400000

How long are delete records retained.

log-cleaner-min-compaction-lag-ms

string

0

The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.

log-cleanup-policy

string

delete

The default cleanup policy for segments beyond the retention window. A comma separated list of valid policies. Valid policies are: ‘delete’ and ‘compact’

log-message-timestamp-type

string

CreateTime

Define whether the timestamp in the message is message create time or log append time. The value should be either ‘CreateTime’ or ‘LogAppendTime’.

ssl-cipher-suites

string

""

A list of cipher suites. This is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol. By default all the available cipher suites are supported.

ssl-principal-mapping-rules

string

DEFAULT

A list of rules for mapping from distinguished name from the client certificate to short name. Each rule starts with ‘RULE:’ and contains an expression as the following. ‘RULE:pattern/replacement/[LU]’. A valid set of rules could look something like this ‘RULE:^.[Cc][Nn]=([a-zA-Z0-9.-_@]).*$/$1/L,DEFAULT’

replication-quota-window-num

int

11

The number of samples to retain in memory for replication quotas.

profile

string

production

Profile representing the scope of deployment, and used to enable high-level customisation of sysconfigs, resource checks/allocation, warning levels, etc. Allowed values are: “production”, “staging” and “testing”

certificate-extra-sans

string

""

Config options to add extra-sans to the ones used when requesting server certificates. The extra-sans are specified by comma-separated names to be added when requesting signed certificates. Use “{unit}” as a placeholder to be filled with the unit number, e.g. “worker-{unit}” will be translated as “worker-0” for unit 0 and “worker-1” for unit 1 when requesting the certificate.

extra-listeners

string

""

Config options to add extra SANs to the ones used when requesting server certificates, and to define custom advertised.listeners and ports for clients external to the Juju model. These items are comma-separated. Use ‘{unit}’ as a placeholder to be filled with the unit number if necessary. For port allocations, providing the port for a given listener will offset the generated port number by that amount, with an accepted value range of 20001-50000. For example, a provided value of ‘worker-{unit}.domain.com:30000’ will generate listeners for unit 0 with name ‘worker-0.domain.com’, and be allocated ports 39092, 39093 etc for each authentication scheme.

log-level

string

INFO

Level of logging for the different components operated by the charm. Possible values: ERROR, WARNING, INFO, DEBUG

network-bandwidth

int

50000

The network bandwidth available for the cloud that the charm is deployed to, in KB.

cruisecontrol-balance-threshold

float

1.1

The maximum allowed extent of unbalance between brokers for cpu, disk and network utilization, and replica counts. For example, a value of 1.1 ensures that no broker should have >1.1x average utilization of all the brokers

cruisecontrol-capacity-threshold

float

0.8

The maximum percentage of the total cpu, disk and network capacity that is allowed to be used on a broker. For example, a value of 0.8 ensures that no broker should have >80% utilization

expose-external

string

nodeport

String to determine how to expose the Apache Kafka cluster externally from the Kubernetes cluster. Possible values: ‘nodeport’, ‘none’

pause-after-unit-refresh

string

none

Wait for manual confirmation to resume refresh after these units refresh Allowed values: “all”, “first”, “none”

This page is generated at build time from machine/config.yaml.