- Java 21 (JDK)
- Maven 3.8+
- Docker (required for integration tests —
StrimziKafkaClusteruses Testcontainers) - GNU Make
# Clone the repository
git clone https://github.com/strimzi/sova.git
cd sova
# Build (no Docker needed)
mvn clean install -DskipTests
# Build and run unit tests (Docker not required)
mvn verifyIntegration tests (*IT.java) are excluded by Surefire and only run by Maven Failsafe inside
the failsafe profile (see the failsafe profile in pom.xml). Plain mvn verify runs zero
ITs — see "Running integration tests only" below.
mvn clean package
cd target && unzip sova-*.zip && cd sova-*/
export STRIMZI_KAFKA_ADMIN_CLIENT_CONFIGURATION='bootstrap.servers=localhost:9092'
java -classpath "libs/*" io.strimzi.sova.MainThere is no runnable JAR — maven-jar-plugin does not set a Main-Class, so
java -jar target/sova-*.jar fails. The ZIP produced by maven-assembly-plugin
(src/assembly/dist.xml) only bundles libs/ plus LICENSE/README; run the
unpacked distribution the same way the README does.
Metrics are available at http://localhost:9404/metrics, the liveness probe at http://localhost:8080/healthy and the readiness probe at http://localhost:8080/ready.
mvn verify -Pfailsafe -Dskip.surefire=true-Dskip.surefire=true skips the unit tests; -DskipTests would skip the integration tests too. In CI, pass it through MVN_ARGS (for example make java_verify MVN_ARGS="-Pfailsafe -Dskip.surefire=true").
Docker must be running. The tests start a StrimziKafkaCluster (Testcontainers) automatically.
Checkstyle runs automatically during build. To run it standalone:
mvn checkstyle:check@validateSpotBugs is not bound to a Maven phase, so mvn verify does not run it. It needs compiled
classes first:
mvn install -DskipTests
make spotbugsKeep SpotBugs at 4.10.5 or newer — earlier releases cannot read Java 25 class files and fail
with Unsupported class file major version 69.
make all runs the install and SpotBugs together — that is what CI gates on. Suppress a
false positive with @SuppressFBWarnings on the member, or, if the pattern is wrong for the
whole project, add a <Match> to .spotbugs/spotbugs-exclude.xml with a comment saying why.
Every push to main publishes sova-<version>-dist.zip to ghcr.io/strimzi/dist-sova as an OCI
artifact, and a release publishes it again under the release version. The package name follows the
strimzi/binaries-operators convention: flat under the org, <kind>-<component>.
| Tag | Pushed by | Contains |
|---|---|---|
0.1.0-SNAPSHOT |
push to main |
sova-0.1.0-SNAPSHOT-dist.zip |
0.1.0-rc1, … |
release.yml |
sova-0.1.0-rc1-dist.zip |
0.1.0 |
release.yml |
sova-0.1.0-dist.zip |
The snapshot tag is mutable and always points at the tip of main. The tag and the file name
inside it always agree, so a consumer can use one version string for both a snapshot and a
release: strimzi-kafka-operator puts 0.1.0-SNAPSHOT, 0.1.0-rc1 or 0.1.0 in its
sova.version file and the ZIP lands under the name its Makefile looks for. An RC and the GA
released from the same build carry identical bytes, only the file name differs.
The package is public, so pulling needs no credentials — GHCR issues anonymous tokens for public packages and ORAS does that handshake itself:
oras pull ghcr.io/strimzi/dist-sova:0.1.0-SNAPSHOT -o ./binariesRelease artifacts are attested, and the attestation covers the ZIP's digest, so it verifies on the copy pulled from GHCR as well as on the GitHub release asset:
gh attestation verify sova-0.1.0-dist.zip --repo strimzi/sovaAll commits require a Developer Certificate of Origin sign-off:
git commit -s -m "Your message"The kafka-clients version in pom.xml must be kept in sync with the version used in strimzi-kafka-operator/pom.xml. Check the operator's pom.xml before bumping.
- Add the field to the
MetricSnapshotrecord, its own top-level file atsrc/main/java/io/strimzi/sova/metrics/MetricSnapshot.java. - Populate it in the relevant collector's result record and thread it through
MetricsCollector.collectInternal(), which builds theMetricSnapshotinline and passes it toMetricsRegistry.update(...). - Add one
.metricSnapshot(...)line toMetricsSnapshotRenderer.from()with the exact metric name, help string, and label names fromREADME.md. Reusescalarorfamily; add a dedicated method only if the labels do not come from the map key alone. - Add an assertion in
MetricsRegistryTest.allMetricsRegistered()that the metric name appears in scrape output, and populate its map in the snapshot. - Add an assertion in
MetricsCollectorITchecking the value. - Document the new metric in
README.md.