Skip to main content

salt-kafka

Kafka tools for Salt

PyPI - Version Gitea Stars

Installation

Can be installed via pip or the Pip version distributed in Salt onedir installs. Salt extensions need to be installed to any salt-minion where they may run.

# Example for Salt onedir
/opt/saltstack/salt/salt-pip install salt-kafka

# Can be installed via Salt commands
salt '*' pip.install salt-kafka

or Via a salt state

salt-minion:
  service.running:
    - enable: true
  # Install any OS requirements
  pkg.installed:
    - aggregate: True
    - pkgs:
        - python3-docker
        - python3-setproctitle
  # Install any pip packages
  pip.installed:
    - pkgs:
        - salt-kafka

Engine

kafka_consumer can be used to map Kafka topics to a Salt topic to be used in automation.

# From Salt Master config

engines:
  - kafka_consumer:
      broker: kafka.example.com:9094
      subscribe:
        # Format is <kafka-topic> / <salt-topic>
        push-repo: kafka/repo
        push-package: kafka/container

States

# Example minion config
kafka.bootstrap.servers: "kafka.example.com:9094"
# Example kafka.sls
my-topic:
    kafka.present:
        - config:
              cleanup.policy: delete
              retention.ms: {{salt['kafka.timedelta_ms']('2d')}}
              retention.bytes: {{ "1GB" | human_to_bytes }}

missing-topic:
    kafka.absent: []

See the Upstream Kafka documentation at http://kafka.apache.org/documentation.html#topicconfigs for valid config options.

Metadata

Release files for salt-kafka 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salt-kafka 0.2.0
File Size Uploaded
salt_kafka-0.2.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for salt-kafka 0.2.0
File Interpreter ABI Platform
salt_kafka-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release files / salt_kafka-0.2.0.tar.gz

Download URL salt_kafka-0.2.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e554528b455309e2cd68cfed22c63553fae142ac712fa6ee99feca9ccc50eef7
BLAKE2b-256 checksum
How to use checksums
c4b34ecd42bafc0f94f08659306ae1c1234c01fdcbed06de481565cb6508e3e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release files / salt_kafka-0.2.0-py3-none-any.whl

Download URL salt_kafka-0.2.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc596c19080eb458918458c780629105bed772663f6bd6253f7e6da34273d7bb
BLAKE2b-256 checksum
How to use checksums
7d36cd371b69093350ddeeb6faea4a3de45043964659bf17515504b5e093deb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page