The principal the cluster state tools run under needs the following ACLs:
- ALTER on the cluster resource to create and delete ACLs
- DESCRIBE on the cluster resource
- the following operations be allowed for topic resources prefixed with the current domain:
- ALTER_CONFIGS, CREATE, and DESCRIBE
- ALTER when changing the number of partitions should be allowed
- DELETE when topic deletion should be allowed
The main entrypoint for using the cluster state tools is the CLI which can be found at net.christophschubert.kafka.clusterstate.actions.CLI
.
It contains a number of subcommands, the most useful of which is apply
.
apply
requires a context, that is, a folder which contains domain files describing the resources to be managed as well as file kst.properties
which is used to pass configuration values.
The following ways can be used to pass config values to the CLI:
-
Include them in the command properties file. This property file defaults to
kst.properties
in the domain folder. Another value can be specified using the--command-properties
(or-c
) command line option of the CLI. -
Specify them using environment variables. By default, all environment variables with the prefix
KST_
will be read and converted to properties according to the following rules:- drop the prefix (e.g.,
KST_
) - lower-case the environment variable name
- replace every underscore (
_
) with a dot (.
)
For example,
KST_BOOTSTRAP_SERVER=localhost:9091
will lead to the propertybootstrap.server=localhost:9091
. Observe that the env var value is not modified.The prefix used to select environment variables can be changed using the
--env-var-prefix
(or-e
) command line option. - drop the prefix (e.g.,