+7
nixos/doc/manual/release-notes/rl-2311.section.md
+7
nixos/doc/manual/release-notes/rl-2311.section.md
···- The binary of the package `cloud-sql-proxy` has changed from `cloud_sql_proxy` to `cloud-sql-proxy`.+- The module `services.apache-kafka` was largely rewritten and has certain breaking changes. To be precise, this means that the following things have changed:+- Most settings have been migrated to [services.apache-kafka.settings](#opt-services.apache-kafka.settings).+- Care must be taken when adapting an existing cluster to these changes, see [](#module-services-apache-kafka-migrating-to-settings).+- By virtue of being less opinionated, it is now possible to use the module to run Apache Kafka in KRaft mode instead of Zookeeper mode.+- [A few options](#module-services-apache-kafka-kraft) have been added to assist in this mode.- Garage has been upgraded to 0.9.x. `services.garage.package` now needs to be explicitly set, so version upgrades can be done in a controlled fashion. For this, we expose `garage_x_y` attributes which can be set here.
+130
-58
nixos/modules/services/misc/apache-kafka.nix
+130
-58
nixos/modules/services/misc/apache-kafka.nix
···+KRaft mode ClusterId used for formatting log directories. Can be generated with `kafka-storage.sh random-uuid`···+services.apache-kafka.configFiles.serverProperties = generator "server.properties" stringlySettings;+systemd.tmpfiles.rules = map (logDir: "d '${logDir}' 0700 apache-kafka - - -") cfg.settings."log.dirs";+${cfg.package}/bin/kafka-storage.sh format -t "${cfg.clusterId}" -c ${cfg.configFiles.serverProperties} --ignore-formatted+if ${concatMapStringsSep " && " (l: ''[ ! -f "${l}/meta.properties" ]'') cfg.settings."log.dirs"}; then+${cfg.package}/bin/kafka-storage.sh format -t "${cfg.clusterId}" -c ${cfg.configFiles.serverProperties}
+63
nixos/modules/services/misc/kafka.md
+63
nixos/modules/services/misc/kafka.md
···+Migrating a cluster to the new `settings`-based changes requires adapting removed options to the corresponding upstream settings.+This means that the upstream [Broker Configs documentation](https://kafka.apache.org/documentation/#brokerconfigs) should be followed closely.+Note that dotted options in the upstream docs do _not_ correspond to nested Nix attrsets, but instead as quoted top level `settings` attributes, as in `services.apache-kafka.settings."broker.id"`, *NOT* `services.apache-kafka.settings.broker.id`.+Care should be taken, especially when migrating clusters from the old module, to ensure that the same intended configuration is reproduced faithfully via `settings`.+To assist in the comparison, the final config can be inspected by building the config file itself, ie. with: `nix-build <nixpkgs/nixos> -A config.services.apache-kafka.configFiles.serverProperties`.+- Removal of `services.apache-kafka.extraProperties` and `services.apache-kafka.serverProperties`+- The intention is for all broker properties to be fully representable via [](#opt-services.apache-kafka.settings).+- Until it can be remedied, you *can* bail out by using [](#opt-services.apache-kafka.configFiles.serverProperties) to the path of a fully rendered properties file.
+61
-24
nixos/tests/kafka.nix
+61
-24
nixos/tests/kafka.nix
·········