New to Kestra?
Use blueprints to kickstart your first workflows.
Audit Karapace Schema Registry subject compatibility modes, detect breaking schema drift, alert on Slack, and safely enforce backward compatibility.
Aiven Karapace is the leading 100% open-source, Apache 2.0 licensed drop-in replacement for Kafka Schema Registry and REST Proxy. In enterprise event-driven architectures, schema registries enforce contracts between producers and consumers. A common operational failure occurs when registry compatibility modes are accidentally relaxed to NONE or FORWARD during ad-hoc testing or rogue CI/CD deployments. When compatibility guards are dropped, producers can publish backward-incompatible schemas that cause downstream streaming pipelines (such as Apache Flink, Spark Streaming, and Kafka consumer microservices) to fail on deserialization. This blueprint continuously audits Karapace global and subject compatibility settings, detects policy drift, alerts data governance teams via Slack, and provides guarded automated remediation to re-enforce strict compatibility rules.
periodic_schema_compliance_audit (io.kestra.plugin.core.trigger.Schedule) initiates scheduled checks every 15 minutes. Shipped disabled so initial manual verification can be performed first.probe_global_config (io.kestra.plugin.core.http.Request) invokes GET /config on the Karapace REST API to inspect active global compatibility settings.probe_registered_subjects (io.kestra.plugin.core.http.Request) invokes GET /subjects to retrieve all registered topic schema subjects.classify_schema_compliance (io.kestra.plugin.core.flow.Switch) analyzes probe outputs:COMPLIANCE_DRIFT_DETECTED: Fires if global compatibility level is set to NONE or FORWARD, dispatching a Slack alert via io.kestra.plugin.slack.notifications.SlackIncomingWebhook. If auto_remediate is enabled and dry_run is false, enforce_compatibility_policy executes PUT /config to restore BACKWARD_TRANSITIVE compliance.NO_SUBJECTS_REGISTERED: Warns the engineering team via Slack if zero subjects are found, highlighting potential storage or connectivity loss.COMPLIANT: Logs healthy schema contract enforcement and total subject counts.log_audit_summary (io.kestra.plugin.core.log.Log) records an immutable audit trail documenting evaluated subject counts and compliance outcome.errors handler catches connection timeouts or unreachable Karapace endpoints, dispatching an immediate incident notification to Slack.BACKWARD_TRANSITIVE compatibility via the Karapace REST API.dry_run defaults to true to ensure full evaluation safety during onboarding.Karapace provides REST endpoints but lacks automated scheduling, alerting, or drift remediation mechanics. Standalone shell scripts lack secret masking, structured retries, execution timelines, and auditable governance. Kestra delivers a declarative, version-controlled YAML blueprint with native scheduling, secure credential handling, conditional routing, and complete execution observability.
ghcr.io/aiven/karapace:latest) requiring no license or account.SLACK_WEBHOOK_URL: Slack incoming webhook URL for dispatching schema compliance alerts.docker run -d --name karapace-test -p 8081:8081 -e KARAPACE_PORT=8081 ghcr.io/aiven/karapace:latest
SLACK_WEBHOOK_URL secret in your Kestra namespace.dry_run: true).log_compliant_state logs nominal compatibility.curl -X PUT http://localhost:8081/config -H "Content-Type: application/vnd.schemaregistry.v1+json" -d '{"compatibility": "NONE"}'
alert_drift_slack firing.periodic_schema_compliance_audit to activate recurring 15-minute surveillance.io.kestra.plugin.core.flow.EachSequential to audit specific tier-1 subjects (orders-value, payments-value).io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for tier-1 streaming pipeline schema drift.io.kestra.plugin.prometheus for tracking schema evolution velocity over time.