Skip to content

docs: add k8s iceberg sink connector (avro) - #1336

Merged
c-thiel merged 12 commits into
lakekeeper:mainfrom
yohanvalencia:kafka-connect-iceberg-sink
Oct 7, 2025
Merged

c-thiel merged 12 commits into
lakekeeper:mainfrom
yohanvalencia:kafka-connect-iceberg-sink

Conversation

@yohanvalencia

@yohanvalencia yohanvalencia commented Sep 14, 2025 •

Copy link
Copy Markdown
Contributor

Description

This pull request introduces a new example for running a Kafka + Iceberg Sink Connector + Trino + Lakekeeper stack on Kind.

Prerequisites:

  • Docker
  • Kind
  • kubectl

Test:

  1. Deploy stack with make
  2. Create dummy events producer make run-producer

Key features:

  • End-to-end demo with AvroSerialized events, Kafka, Trino, MinIO, Postgres, and Lakekeeper.
  • Producer (small python script) and Kafka Connect (with Iceberg sink) included.

Summary by CodeRabbit

  • New Features

    • Added a one-command local Kafka→Iceberg demo on Kubernetes (Kind) that provisions Kafka, Schema Registry, Kafka UI, Kafka Connect (Iceberg sink), Lakekeeper catalog, MinIO storage, Postgres, and Trino.
    • Includes containerized producer, Avro schema/topic bootstrapping, and Make targets to provision, build/load images, run the producer, and tear down the environment.
  • Documentation

    • Added README with prerequisites, workflow (make all, run-producer, destroy), and component overview.

@coderabbitai

coderabbitai Bot commented Sep 14, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds a new end-to-end Kind-based example under examples/kafka-connect-iceberg-sink: orchestration (Makefile, README), Docker images (Connect + producer), Kubernetes manifests for Kafka/Connect/Schema Registry/UI, Lakekeeper, Trino, MinIO, Postgres, namespaces, and a sample Avro producer with jobs and bootstrap/migration steps.

Changes

Cohort / File(s) Summary of Changes
Orchestration & Docs
examples/kafka-connect-iceberg-sink/Makefile, examples/kafka-connect-iceberg-sink/README.md
New Makefile implementing cluster/namespace lifecycle, image build/load, component deployment targets; README documents prerequisites and make targets (all, run-producer, destroy, etc.).
Docker Images
examples/kafka-connect-iceberg-sink/docker/kafka-connect/Dockerfile, examples/kafka-connect-iceberg-sink/docker/producer/Dockerfile
Multi-stage Connect Dockerfile installs Iceberg sink and Avro converter via confluent-hub; producer Dockerfile packages Python 3.12 app with uv and non-root runtime.
Kafka Core & Connect
examples/kafka-connect-iceberg-sink/kafka/cluster.yaml, examples/kafka-connect-iceberg-sink/kafka/topics.yaml, examples/kafka-connect-iceberg-sink/kafka/kafka-connect.yaml
Strimzi KRaft node pool and Kafka cluster CRs, KafkaTopic resources, KafkaConnect CR and KafkaConnector CR configured for Iceberg sink with Avro converter and schema registry integration.
Schema Registry & UI
examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml, examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml, examples/kafka-connect-iceberg-sink/kafka/kafka-ui.yaml
Deployment + Service for internal Schema Registry, Job to register Avro schema, and Kafka UI Deployment.
Lakekeeper Catalog
examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml, .../lakekeeper/serve.yaml, .../lakekeeper/bootstrap.yaml
Job to run DB migrations, Deployment+Service to serve Lakekeeper, and bootstrap Job to accept terms and create warehouse/storage profile.
Storage Services
examples/kafka-connect-iceberg-sink/storage/minio.yaml, examples/kafka-connect-iceberg-sink/storage/postgres.yaml
MinIO Deployment with bucket-init sidecar and NodePort service; Postgres Deployment with liveness/readiness probes and ClusterIP service.
Trino Integration
examples/kafka-connect-iceberg-sink/trino/kafka-catalog-configmap.yaml, examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml
ConfigMap with Trino config and Iceberg REST catalog properties; Trino Deployment mounting the ConfigMap.
Namespaces
examples/kafka-connect-iceberg-sink/namespace/namespace.yaml
Adds four namespaces: kafka, storage, trino, catalog.
Producer App
examples/kafka-connect-iceberg-sink/producer/main.py, .../producer/pyproject.toml, .../producer/producer.yaml, .../producer/README.md, .../producer/.python-version, .../producer/.gitignore
Python Avro producer implementation, packaging metadata, Kubernetes Job to run producer, README, Python version file, and .gitignore for uv.lock.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Make as Makefile
  participant Kind as Kind
  participant K8s as kubectl / API
  participant Strimzi as Strimzi (Kafka/Connect)
  participant SR as Schema Registry
  participant MinIO as MinIO
  participant PG as Postgres
  participant Lake as Lakekeeper
  participant Trino as Trino
  participant Prod as Producer Job

  Dev->>Make: make all
  Make->>Kind: create cluster (if missing)
  Make->>K8s: apply namespaces
  Make->>Make: build & load images
  Make->>K8s: deploy storage (MinIO, Postgres)
  Make->>K8s: install Strimzi & Kafka cluster
  Make->>K8s: deploy Schema Registry, topics, init job
  Make->>K8s: deploy Kafka Connect + KafkaConnector
  Make->>K8s: deploy Lakekeeper (migrate, serve, bootstrap)
  Make->>K8s: deploy Trino + ConfigMap
  Make-->>Dev: environment ready

  Dev->>Make: make run-producer
  Make->>K8s: run Producer Job
  Prod->>SR: fetch Avro schema
  Prod->>Strimzi: produce Avro events
  Strimzi->>Lake: Iceberg Sink -> REST catalog writes
  Trino->>Lake: query catalog
  Trino->>MinIO: read data files
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Poem

I spun up a cluster, hop-hop, what a sight!
Buckets and brokers all humming just right.
Avro in paw, I nibbled each byte—
Lakekeeper hummed, "Tables ignite!"
Trino said "query?" — I thumped in delight. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat(examples): add k8s iceberg sink connector (avro)" is concise and accurately captures the primary change—adding an examples-level Kubernetes Iceberg sink connector demo that uses Avro-serialized events. It clearly scopes the change to the examples area and matches the provided changeset which adds Kafka, Connect, Lakekeeper, Trino, storage, and a Python Avro producer. For clarity you may optionally expand "k8s" to "Kubernetes" or capitalize "Avro", but the current title is not misleading.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cla-assistant

cla-assistant Bot commented Sep 14, 2025 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Sep 14, 2025

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 30

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
examples/kafka-connect-iceberg-sink/docker/kafka-connect/Dockerfile (1)

1-13: Be explicit about plugin path and add minimal metadata.

Strimzi defaults to /opt/kafka/plugins, but making it explicit reduces surprises and helps debugging. Also add labels for traceability.

 FROM confluentinc/cp-kafka-connect:8.0.0 AS downloader

 ARG CONFLUENT_HUB_ICEBERG_SINK_VERSION=1.9.2
 ARG CONFLUENT_HUB_AVRO_VERSION=8.0.0

 RUN confluent-hub install --no-prompt iceberg/iceberg-kafka-connect:${CONFLUENT_HUB_ICEBERG_SINK_VERSION} && \
     confluent-hub install --no-prompt confluentinc/kafka-connect-avro-converter:${CONFLUENT_HUB_AVRO_VERSION}

 FROM quay.io/strimzi/kafka:0.47.0-kafka-4.0.0 AS connector
+LABEL org.opencontainers.image.title="Iceberg Kafka Connect (Strimzi)" \
+      org.opencontainers.image.version="${CONFLUENT_HUB_ICEBERG_SINK_VERSION}" \
+      org.opencontainers.image.source="examples/kafka-connect-iceberg-sink/docker/kafka-connect/Dockerfile"
 USER root:root
 COPY --from=downloader /usr/share/confluent-hub-components /opt/kafka/plugins/
+ENV KAFKA_CONNECT_PLUGIN_PATH=/opt/kafka/plugins
 USER 1001
examples/kafka-connect-iceberg-sink/lakekeeper/bootstrap.yaml (1)

14-55: Make the bootstrap script resilient (retry + strict mode).

Single-shot curl can flake while Lakekeeper starts. Add retries and strict shell flags.

         command:
           - sh
           - -c
           - |
-            set -e
+            set -euo pipefail
+            until curl -sf http://lakekeeper:8181/health; do
+              echo "Waiting for lakekeeper..."
+              sleep 3
+            done
             echo "Running bootstrap..."
-            curl --location 'http://lakekeeper:8181/management/v1/bootstrap' \
+            curl --fail --location 'http://lakekeeper:8181/management/v1/bootstrap' \
               --header 'Content-Type: application/json' \
               --data '{"accept-terms-of-use": true}'
@@
-            curl -X 'POST' \
+            curl --fail -X 'POST' \
               'http://lakekeeper:8181/management/v1/warehouse' \
🧹 Nitpick comments (34)
examples/kafka-connect-iceberg-sink/producer/.gitignore (1)

1-1: Expand ignores for typical Python artifacts.

Add common Python ignores to avoid accidental commits of local env/cache.

 uv.lock
+__pycache__/
+*.py[cod]
+.venv/
+.env
+.pytest_cache/
+.ruff_cache/
examples/kafka-connect-iceberg-sink/kafka/cluster.yaml (1)

19-20: Consider deleteClaim: true for easier cleanup.

Leaving PVCs after teardown complicates “destroy”; for ephemeral demos, prefer automatic claim deletion.

-        deleteClaim: false
+        deleteClaim: true
examples/kafka-connect-iceberg-sink/namespace/namespace.yaml (1)

1-20: Align cleanup to delete all namespaces, not just kafka.

README mentions deleting only the kafka namespace. Ensure Makefile’s destroy deletes kafka, storage, trino, and catalog, or update docs.

examples/kafka-connect-iceberg-sink/README.md (1)

48-53: Cleanup instructions inconsistent with namespaces created.

Docs say “delete the namespace” (singular) and list delete-namespace deleting only kafka. This example creates four namespaces. Clarify and/or provide a target to delete all four.

-- `make delete-namespace` – delete the `kafka` namespace
+- `make delete-namespaces` – delete the `kafka`, `storage`, `trino`, and `catalog` namespaces
examples/kafka-connect-iceberg-sink/storage/postgres.yaml (2)

56-58: Ephemeral storage: acceptable for demo; call it out.

emptyDir means data loss on pod restart. If you expect restarts during the demo, consider a PVC with a reclaimPolicy matching your cleanup flow.


42-51: Probe target DB: consider checking ‘catalog’ for readiness.

You create POSTGRES_DB=catalog; probing -d catalog ensures the app waits until that DB exists.

-            - pg_isready -U postgres -p 5432 -d postgres
+            - pg_isready -U postgres -p 5432 -d catalog
examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml (4)

20-21: Pin the image to a version or digest.

latest-main is mutable and harms reproducibility. Pin a released tag or digest.


34-35: Tone down RUST_LOG from trace.

Trace in prod-ish demos is noisy and may log sensitive data; prefer info or warn.

-        - name: RUST_LOG
-          value: "trace,axum=trace,sqlx=trace,lakekeeper=trace"
+        - name: RUST_LOG
+          value: "info,axum=info,sqlx=info,lakekeeper=info"

36-47: Consider a startupProbe to avoid early liveness failures.

Helps while DB migrates/warms up.

         livenessProbe:
+          # Add startupProbe so liveness doesn't kill during warmup
+        startupProbe:
+          httpGet:
+            path: /health
+            port: 8181
+          failureThreshold: 30
+          periodSeconds: 2

57-63: Do you really need NodePort? Prefer ClusterIP for local Kind; gate NodePort behind a flag.

Reduces exposure and port collisions on dev hosts.

 spec:
-  type: NodePort
+  type: ClusterIP
   ports:
   - port: 8181
     targetPort: 8181
-    nodePort: 30181
     protocol: TCP
     name: http
examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml (1)

17-18: Pin image version/digest for reproducibility.

examples/kafka-connect-iceberg-sink/producer/README.md (2)

10-12: Document dependencies or remove the empty section.

Empty “Python dependencies” section is confusing.

-* Python dependencies:
+* Python dependencies: declared in producer/pyproject.toml. Install with:
+
+```bash
+uv pip install --system -r <(uv pip compile pyproject.toml)
+```

26-27: Clarify throughput defaults.

“Default: unlimited” conflicts with numeric defaults. Prefer 0 to mean unlimited.

-| `--throughput`          | int  | `100000000`             | Target throughput in messages per second (default: unlimited)    |
-| `--num-records`         | int  | `100000`                | Total number of records to send                                  |
+| `--throughput`          | int  | `0`                     | Target msgs/sec (0 means unlimited)                              |
+| `--num-records`         | int  | `0`                     | Total records (0 means run until interrupted)                    |
examples/kafka-connect-iceberg-sink/storage/minio.yaml (1)

71-82: Confirm NodePort necessity; ClusterIP is enough inside Kind.

If external access isn’t required, remove nodePorts to avoid host port conflicts.

examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml (2)

21-22: Pin image version/digest.

Locks behavior during demos and avoids surprise upgrades.


1-10: Expose Trino with a Service for convenience.

Add ClusterIP/NodePort/Ingress as needed for SQL clients.

Service:

apiVersion: v1
kind: Service
metadata:
  name: trino
  namespace: trino
spec:
  selector: {app: trino}
  ports:
    - name: http
      port: 8080
      targetPort: 8080
  type: ClusterIP
examples/kafka-connect-iceberg-sink/docker/producer/Dockerfile (1)

1-1: Optional: pin base image by digest for reproducibility.

examples/kafka-connect-iceberg-sink/kafka/kafka-ui.yaml (2)

1-29: Expose the UI with a Service (simplest: ClusterIP + port-forward).

Without a Service, accessing the UI requires port-forwarding the Pod/Deployment directly. Add a Service for clarity and simpler workflows.

 apiVersion: apps/v1
 kind: Deployment
@@
           env:
             - name: KAFKA_CLUSTERS_0_NAME
               value: "my-cluster"
             - name: KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS
               value: "my-cluster-kafka-bootstrap:9092"
             - name: KAFKA_CLUSTERS_0_SCHEMAREGISTRY
               value: "http://internal-schema-registry:8085"
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: kafka-ui
+  namespace: kafka
+  labels:
+    app: kafka-ui
+spec:
+  selector:
+    app: kafka-ui
+  ports:
+    - name: http
+      port: 8080
+      targetPort: 8080

You can then run: kubectl -n kafka port-forward svc/kafka-ui 8080:8080

Please confirm you prefer Service + port-forward vs. NodePort/Ingress for the example.


20-20: Pin image by digest for reproducibility.

Optional, but helps avoid surprise upgrades when v0.7.2 is rebuilt.

examples/kafka-connect-iceberg-sink/producer/producer.yaml (2)

10-13: ttlSecondsAfterFinished: 0 deletes the Job immediately; you’ll likely lose logs.

Use a small TTL (e.g., 5 minutes) or omit the field to keep Jobs for debugging.

-  ttlSecondsAfterFinished: 0
+  ttlSecondsAfterFinished: 300

12-31: Harden Job Pod: disable SA token, add securityContext and resource bounds

Add minimal pod hardening and resource requests/limits to the producer Job; disable automounting the service-account token.

File: examples/kafka-connect-iceberg-sink/producer/producer.yaml — template.spec and container

  template:
    spec:
+      automountServiceAccountToken: false
      restartPolicy: Never
      containers:
        - name: producer
          image: producer:latest
          imagePullPolicy: Never
+          securityContext:
+            runAsNonRoot: true
+            allowPrivilegeEscalation: false
+            readOnlyRootFilesystem: true
+            capabilities:
+              drop: ["ALL"]
+          resources:
+            requests:
+              cpu: 50m
+              memory: 64Mi
+            limits:
+              cpu: 500m
+              memory: 256Mi

If running outside kind, change imagePullPolicy: Never -> IfNotPresent or parameterize it via kustomize/Makefile.

examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml (2)

10-10: Preserve logs briefly instead of immediate cleanup.

 spec:
   backoffLimit: 0
-  ttlSecondsAfterFinished: 0
+  ttlSecondsAfterFinished: 300

37-52: Capture HTTP status, persist response, and set Job TTL; 'events-value' confirmed

Use curl -s -o /tmp/resp.json -w "%{http_code}", fail on non-2xx or missing "id", and set ttlSecondsAfterFinished: 300 in examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml.

-              RESPONSE=$(curl -X POST \
-                -H "Content-Type: application/vnd.schemaregistry.v1+json" \
-                -d @/tmp/payload.json \
-                http://internal-schema-registry:8085/subjects/events-value/versions)
+              HTTP_CODE=$(curl -s -o /tmp/resp.json -w "%{http_code}" -X POST \
+                -H "Content-Type: application/vnd.schemaregistry.v1+json" \
+                -d @/tmp/payload.json \
+                http://internal-schema-registry:8085/subjects/events-value/versions)
-              echo "Response: $RESPONSE"
+              echo "HTTP: $HTTP_CODE"
+              echo "Response:"
+              cat /tmp/resp.json
@@
-              if echo "$RESPONSE" | grep -q '"id"'; then
+              if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ] && grep -q '"id"' /tmp/resp.json; then
                 echo "✅ Schema registered successfully!"
               else
                 echo "❌ Failed to register schema"
                 exit 1
               fi

Verified: 'events-value' is the producer's SCHEMA_SUBJECT (examples/kafka-connect-iceberg-sink/producer/main.py and producer/producer.yaml). Kafka Connect uses io.confluent.connect.avro.AvroConverter with no custom subject.name.strategy (examples/kafka-connect-iceberg-sink/kafka/kafka-connect.yaml), so topic-based subject naming -> events-value matches.

examples/kafka-connect-iceberg-sink/kafka/topics.yaml (1)

58-69: events topic: confirm partitioning vs. sink parallelism.

One partition is fine for the demo; if you plan to showcase parallel ingestion, bump partitions and (optionally) produce keyed records.

I can propose a topic/producer tweak to add keys and increase partitions if you want to demonstrate parallelism.

examples/kafka-connect-iceberg-sink/producer/main.py (3)

29-33: Throughput default contradicts the help text; make “unlimited” explicit.

Use 0 to mean unlimited (your later condition already supports it).

-parser.add_argument('--throughput', type=int, default=100_0000_000, 
-                    help='Target throughput in messages per second (default: unlimited)')
+parser.add_argument('--throughput', type=int, default=0,
+                    help='Target throughput in messages per second (0 = unlimited; default: 0)')

66-69: Log full traceback when schema fetch fails.

Use logging.exception and consider narrowing the exception.

-except Exception as e:
-    logger.error(f"Failed to fetch schema: {e}")
+except Exception:
+    logger.exception("Failed to fetch schema")
     sys.exit(1)

115-118: Optional: produce keyed records for deterministic partitioning.

Given you already configure a StringSerializer for keys, consider using tradeId as the key for more realistic partitioning patterns.

-                # key=event["tradeId"],
+                key=event["tradeId"],
examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml (2)

23-36: Set replication/min.insync for _schemas in single-node demos.

Avoids failures when cluster defaults expect RF=3.

             - name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
               value: _schemas
+            - name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC_REPLICATION_FACTOR
+              value: "1"
+            - name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC_MIN_INSYNC_REPLICAS
+              value: "1"

27-31: HOST_NAME generally not needed behind K8s Service.

Schema Registry infers listeners; setting HOST_NAME can complicate advertised URL in scaling scenarios. Consider removing unless required elsewhere.

examples/kafka-connect-iceberg-sink/Makefile (3)

4-5: Allow overriding NAMESPACE; current := hard-codes it.

Enables demos in other namespaces without editing the file.

-CLUSTER     ?= demo-cluster
-NAMESPACE   := kafka
+CLUSTER     ?= demo-cluster
+NAMESPACE   ?= kafka

10-12: Declare PHONY targets to satisfy linters and avoid name collisions.

Also silences checkmake warnings.

-.PHONY: cluster
+.PHONY: all build-images destroy \
+	cluster delete-cluster \
+	install-namespace delete-namespace \
+	install-storage \
+	build-producer-image run-producer stop-producer \
+	build-kafka-connect install-kafka \
+	install-catalog install-trino
+.PHONY: cluster

43-46: Consider waiting for MinIO and Postgres before proceeding.

Prevents Lakekeeper/bootstrap races.

 install-storage:
 	kubectl apply -f storage/minio.yaml
 	kubectl apply -f storage/postgres.yaml
+	@echo "⏳ Waiting for storage to be ready..."
+	kubectl rollout status statefulset/minio -n $(NAMESPACE)
+	kubectl rollout status statefulset/postgres -n $(NAMESPACE)
examples/kafka-connect-iceberg-sink/kafka/kafka-connect.yaml (2)

7-10: Misleading label on KafkaConnect.

strimzi.io/cluster label is used on KafkaConnector to target a KafkaConnect by name. Having it here with value my-cluster (Kafka cluster name) is confusing. Remove it or change to a neutral app label.

 metadata:
   name: kafka-connect
   namespace: kafka
-  labels:
-    strimzi.io/cluster: my-cluster

49-69: Improve connector resiliency and observability for demos.

Optional but helpful: tolerate record errors and log them instead of failing the task.

   config:
     topics: events
+    errors.tolerance: all
+    errors.log.enable: true
+    errors.log.include.messages: true
+    offset.flush.interval.ms: 10000
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39bea3e and 2561790.

📒 Files selected for processing (24)
  • examples/kafka-connect-iceberg-sink/Makefile (1 hunks)
  • examples/kafka-connect-iceberg-sink/README.md (1 hunks)
  • examples/kafka-connect-iceberg-sink/docker/kafka-connect/Dockerfile (1 hunks)
  • examples/kafka-connect-iceberg-sink/docker/producer/Dockerfile (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/cluster.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/kafka-connect.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/kafka-ui.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/topics.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/lakekeeper/bootstrap.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/namespace/namespace.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/.gitignore (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/.python-version (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/README.md (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/main.py (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/producer.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/pyproject.toml (1 hunks)
  • examples/kafka-connect-iceberg-sink/storage/minio.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/storage/postgres.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/trino/kafka-catalog-configmap.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml (1 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
examples/kafka-connect-iceberg-sink/storage/postgres.yaml

[medium] 2-59: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-59: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/kafka/kafka-ui.yaml

[medium] 1-29: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-29: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml

[medium] 2-37: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-37: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml

[medium] 1-48: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-48: Minimize the admission of root containers

(CKV_K8S_23)


[medium] 31-32: Basic Auth Credentials

(CKV_SECRET_4)

examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml

[medium] 2-44: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-44: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml

[medium] 1-29: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-29: Minimize the admission of root containers

(CKV_K8S_23)


[medium] 25-26: Basic Auth Credentials

(CKV_SECRET_4)

examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml

[medium] 2-52: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-52: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/lakekeeper/bootstrap.yaml

[medium] 1-54: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-54: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/producer/producer.yaml

[medium] 1-28: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-28: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/storage/minio.yaml

[medium] 1-64: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-64: Minimize the admission of root containers

(CKV_K8S_23)

🪛 checkmake (0.2.2)
examples/kafka-connect-iceberg-sink/Makefile

[warning] 18-18: Target body for "cluster" exceeds allowed length of 5 (7).

(maxbodylength)


[warning] 17-17: Missing required phony target "all"

(minphony)


[warning] 17-17: Missing required phony target "clean"

(minphony)


[warning] 17-17: Missing required phony target "test"

(minphony)


[warning] 10-10: Target "all" should be declared PHONY.

(phonydeclared)


[warning] 12-12: Target "destroy" should be declared PHONY.

(phonydeclared)

🪛 Ruff (0.12.2)
examples/kafka-connect-iceberg-sink/producer/main.py

66-66: Do not catch blind exception: Exception

(BLE001)


67-67: Use logging.exception instead of logging.error

Replace with exception

(TRY400)


108-108: Standard pseudo-random generators are not suitable for cryptographic purposes

(S311)


109-109: Standard pseudo-random generators are not suitable for cryptographic purposes

(S311)


110-110: Standard pseudo-random generators are not suitable for cryptographic purposes

(S311)

🔇 Additional comments (13)
examples/kafka-connect-iceberg-sink/producer/.python-version (1)

1-1: LGTM: version pin matches Docker base (3.12).

examples/kafka-connect-iceberg-sink/kafka/cluster.yaml (2)

9-12: Single node, dual role is fine for demo; call out limitation.

One replica for both controller and broker is non-HA; OK for examples, but highlight in README to avoid prod reuse.


33-35: Confirm Strimzi/Kafka version compatibility.

Kafka 4.0.0 + metadataVersion 4.0-IV3 requires a recent Strimzi operator. Ensure your operator bundle in the Makefile matches this level.

examples/kafka-connect-iceberg-sink/docker/kafka-connect/Dockerfile (1)

3-7: Version skew risk (CP 8.0.0 plugins on Kafka 4.0 runtime).

Likely fine, but please confirm connector loads and Avro converter resolves at runtime with your schema-registry version.

examples/kafka-connect-iceberg-sink/storage/postgres.yaml (1)

60-76: LGTM: service wiring and selector match.

examples/kafka-connect-iceberg-sink/producer/pyproject.toml (1)

7-16: Verify usage and tighten pins in examples/kafka-connect-iceberg-sink/producer/pyproject.toml

PyPI check shows these latest versions exist: attrs 25.3.0; authlib 1.6.3; cachetools 6.2.0; confluent-kafka 2.11.1; fastavro 1.12.0; httpx 0.28.1; orjson 3.11.3; urllib3 2.5.0. Repo scan failed (examples/kafka-connect-iceberg-sink/producer not present in sandbox). Action: verify which of these packages are actually imported/used and remove unused ones to reduce image size; replace >= pins with ~= (or exact pins) for reproducibility. To verify locally run: rg -nP '^\s*(import|from)\s+' examples/kafka-connect-iceberg-sink/producer

examples/kafka-connect-iceberg-sink/trino/kafka-catalog-configmap.yaml (1)

14-15: Verify Lakekeeper REST path.

Confirm /catalog is correct for the deployed image; some catalogs expect root URI without suffix.

examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml (1)

33-44: Mount node.properties and jvm.config or confirm image provides sane defaults (trinodb/trino:474).

examples/kafka-connect-iceberg-sink/trino/kafka-catalog-configmap.yaml contains only config.properties and iceberg_lakehouse.properties and trino-deployment.yaml mounts only config.properties; either add node.properties/jvm.config to the ConfigMap and mount them, or verify that trinodb/trino:474 provides sensible /etc/trino/node.properties and /etc/trino/jvm.config before merging.

Add ConfigMap keys and mounts:

      volumes:
      - name: trino-config
        configMap:
          name: trino-kafka-catalog
          items:
            - key: config.properties
              path: config.properties
+            - key: node.properties
+              path: node.properties
+            - key: jvm.config
+              path: jvm.config

Files: examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml, examples/kafka-connect-iceberg-sink/trino/kafka-catalog-configmap.yaml

examples/kafka-connect-iceberg-sink/kafka/topics.yaml (1)

1-29: Connect internal topics look correct (compacted).

Partitions/replicas and compaction settings for configs/offsets/status align with common Connect defaults for a single-broker kind setup.

If you expect higher connector/task counts, consider increasing connect-cluster-status partitions beyond 5 and tuning min.cleanable.dirty.ratio.

examples/kafka-connect-iceberg-sink/producer/main.py (1)

71-74: Use named args for AvroSerializer to avoid signature mix-ups across versions.

This prevents accidental parameter order issues.

-avro_serializer = AvroSerializer(
-    schema_registry_client,
-    schema_str
-)
+avro_serializer = AvroSerializer(
+    schema_registry_client=schema_registry_client,
+    schema_str=schema_str
+)
examples/kafka-connect-iceberg-sink/kafka/kafka-ui.yaml (1)

18-29: Harden the Pod: run as non-root, disable privilege escalation, add probes & resources.

Addresses Checkov CKV_K8S_20/23 and improves stability.

File: examples/kafka-connect-iceberg-sink/kafka/kafka-ui.yaml (lines 18-29)

       containers:
         - name: kafka-ui
           image: provectuslabs/kafka-ui:v0.7.2
           ports:
             - containerPort: 8080
+          securityContext:
+            runAsNonRoot: true
+            allowPrivilegeEscalation: false
+            readOnlyRootFilesystem: true
+            capabilities:
+              drop: ["ALL"]
+          resources:
+            requests:
+              cpu: 50m
+              memory: 128Mi
+            limits:
+              cpu: 500m
+              memory: 512Mi
+          readinessProbe:
+            httpGet:
+              path: /actuator/health
+              port: 8080
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          livenessProbe:
+            httpGet:
+              path: /actuator/health
+              port: 8080
+            initialDelaySeconds: 20
+            periodSeconds: 20

If /actuator/health isn’t exposed by this image, switch the probe path to / and verify the status code.

examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml (1)

15-16: Keep confluentinc/cp-schema-registry:8.0.0 — curl is present; no change required.

Confluent Platform base images include curl (cp-base-lite lists curl), so the Job’s curl calls will work with confluentinc/cp-schema-registry:8.0.0. (docs.confluent.io)

examples/kafka-connect-iceberg-sink/kafka/kafka-connect.yaml (1)

52-58: Double-check S3/warehouse wiring with Lakekeeper.

If Lakekeeper expects a bucket URI, warehouse might need to be s3://demo (not just demo). Verify with your serve/bootstrap config.

Comment on lines +16 to +36
spec:
containers:
- name: internal-schema-registry
image: confluentinc/cp-schema-registry:8.0.0
ports:
- containerPort: 8085
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: my-cluster-kafka-brokers:9092
- name: SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL
value: PLAINTEXT
- name: SCHEMA_REGISTRY_HOST_NAME
value: internal-schema-registry
- name: SCHEMA_REGISTRY_LISTENERS
value: http://0.0.0.0:8085
- name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
value: "http"
- name: SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL
value: INFO
- name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
value: _schemas

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Harden the pod: run as non-root, drop caps, no privilege escalation.

Addresses Checkov CKV_K8S_20 and CKV_K8S_23.

     spec:
-      containers:
+      securityContext:
+        runAsNonRoot: true
+        runAsUser: 10001
+        fsGroup: 10001
+        seccompProfile:
+          type: RuntimeDefault
+      containers:
         - name: internal-schema-registry
           image: confluentinc/cp-schema-registry:8.0.0
+          securityContext:
+            allowPrivilegeEscalation: false
+            readOnlyRootFilesystem: true
+            capabilities:
+              drop: ["ALL"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spec:
containers:
- name: internal-schema-registry
image: confluentinc/cp-schema-registry:8.0.0
ports:
- containerPort: 8085
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: my-cluster-kafka-brokers:9092
- name: SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL
value: PLAINTEXT
- name: SCHEMA_REGISTRY_HOST_NAME
value: internal-schema-registry
- name: SCHEMA_REGISTRY_LISTENERS
value: http://0.0.0.0:8085
- name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
value: "http"
- name: SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL
value: INFO
- name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
value: _schemas
spec:
securityContext:
runAsNonRoot: true
runAsUser: 10001
fsGroup: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: internal-schema-registry
image: confluentinc/cp-schema-registry:8.0.0
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
ports:
- containerPort: 8085
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: my-cluster-kafka-brokers:9092
- name: SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL
value: PLAINTEXT
- name: SCHEMA_REGISTRY_HOST_NAME
value: internal-schema-registry
- name: SCHEMA_REGISTRY_LISTENERS
value: http://0.0.0.0:8085
- name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
value: "http"
- name: SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL
value: INFO
- name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
value: _schemas
🤖 Prompt for AI Agents
In examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml around lines
16 to 36, the pod runs as root and lacks hardened securityContext settings;
update the pod and container security contexts to run as non-root and prevent
privilege escalation: set podSpec.securityContext.runAsNonRoot: true and a
non-root runAsUser (e.g. 1000) and optionally fsGroup, and add
container.securityContext with runAsNonRoot: true, runAsUser: 1000,
allowPrivilegeEscalation: false, and capabilities.drop: ["ALL"] (and set
readOnlyRootFilesystem: true if appropriate) to drop capabilities and block
privilege escalation.

Comment on lines +19 to +36
image: confluentinc/cp-schema-registry:8.0.0
ports:
- containerPort: 8085
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: my-cluster-kafka-brokers:9092
- name: SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL
value: PLAINTEXT
- name: SCHEMA_REGISTRY_HOST_NAME
value: internal-schema-registry
- name: SCHEMA_REGISTRY_LISTENERS
value: http://0.0.0.0:8085
- name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
value: "http"
- name: SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL
value: INFO
- name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
value: _schemas

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add resources + probes for stability.

Without limits/requests and health checks, rollout and restarts are brittle.

           image: confluentinc/cp-schema-registry:8.0.0
           ports:
             - containerPort: 8085
+          resources:
+            requests:
+              cpu: 100m
+              memory: 256Mi
+            limits:
+              cpu: 500m
+              memory: 512Mi
+          livenessProbe:
+            httpGet:
+              path: /health
+              port: 8085
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          readinessProbe:
+            httpGet:
+              path: /health
+              port: 8085
+            initialDelaySeconds: 5
+            periodSeconds: 5
           env:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
image: confluentinc/cp-schema-registry:8.0.0
ports:
- containerPort: 8085
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: my-cluster-kafka-brokers:9092
- name: SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL
value: PLAINTEXT
- name: SCHEMA_REGISTRY_HOST_NAME
value: internal-schema-registry
- name: SCHEMA_REGISTRY_LISTENERS
value: http://0.0.0.0:8085
- name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
value: "http"
- name: SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL
value: INFO
- name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
value: _schemas
image: confluentinc/cp-schema-registry:8.0.0
ports:
- containerPort: 8085
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /health
port: 8085
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 8085
initialDelaySeconds: 5
periodSeconds: 5
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: my-cluster-kafka-brokers:9092
- name: SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL
value: PLAINTEXT
- name: SCHEMA_REGISTRY_HOST_NAME
value: internal-schema-registry
- name: SCHEMA_REGISTRY_LISTENERS
value: http://0.0.0.0:8085
- name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
value: "http"
- name: SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL
value: INFO
- name: SCHEMA_REGISTRY_KAFKASTORE_TOPIC
value: _schemas

Comment on lines +19 to +32
containers:
- name: trino
image: trinodb/trino:474
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
volumeMounts:
- name: trino-config
mountPath: /etc/trino/config.properties
subPath: config.properties
- name: iceberg-lakehouse-catalog
mountPath: /etc/trino/catalog/iceberg_lakehouse.properties
subPath: iceberg_lakehouse.properties
volumes:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add readiness/liveness probes for Trino.

Ensures K8s routes traffic only when the coordinator is ready.

       containers:
       - name: trino
         image: trinodb/trino:474
         imagePullPolicy: IfNotPresent
         ports:
         - containerPort: 8080
+        readinessProbe:
+          httpGet: {path: /v1/info, port: 8080}
+          initialDelaySeconds: 15
+          periodSeconds: 5
+        livenessProbe:
+          httpGet: {path: /v1/info, port: 8080}
+          initialDelaySeconds: 30
+          periodSeconds: 10
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
containers:
- name: trino
image: trinodb/trino:474
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
volumeMounts:
- name: trino-config
mountPath: /etc/trino/config.properties
subPath: config.properties
- name: iceberg-lakehouse-catalog
mountPath: /etc/trino/catalog/iceberg_lakehouse.properties
subPath: iceberg_lakehouse.properties
volumes:
containers:
- name: trino
image: trinodb/trino:474
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /v1/info
port: 8080
initialDelaySeconds: 15
periodSeconds: 5
livenessProbe:
httpGet:
path: /v1/info
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
- name: trino-config
mountPath: /etc/trino/config.properties
subPath: config.properties
- name: iceberg-lakehouse-catalog
mountPath: /etc/trino/catalog/iceberg_lakehouse.properties
subPath: iceberg_lakehouse.properties
volumes:
🤖 Prompt for AI Agents
In examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml around lines
19-32, the Trino container lacks Kubernetes readiness and liveness probes; add
an HTTP readinessProbe and livenessProbe that hit the Trino coordinator endpoint
(e.g., HTTP GET on port 8080 path /v1/info or /v1/health) so traffic only routes
when ready and crashes are recovered; configure reasonable timings such as
readinessProbe with initialDelaySeconds ~30, periodSeconds ~10, timeoutSeconds
~5 and livenessProbe with initialDelaySeconds ~60, periodSeconds ~20,
timeoutSeconds ~5 and failureThreshold 3 (adjust values to your environment) and
attach them to the trino container spec.

⚠️ Potential issue

Harden security context and add resources.

     spec:
+      securityContext: {runAsNonRoot: true, seccompProfile: {type: RuntimeDefault}}
       containers:
       - name: trino
@@
+        securityContext:
+          allowPrivilegeEscalation: false
+          capabilities: {drop: ["ALL"]}
+          runAsUser: 1000
+        resources:
+          requests: {cpu: "500m", memory: "1Gi"}
+          limits: {cpu: "2", memory: "4Gi"}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
containers:
- name: trino
image: trinodb/trino:474
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
volumeMounts:
- name: trino-config
mountPath: /etc/trino/config.properties
subPath: config.properties
- name: iceberg-lakehouse-catalog
mountPath: /etc/trino/catalog/iceberg_lakehouse.properties
subPath: iceberg_lakehouse.properties
volumes:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: trino
image: trinodb/trino:474
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsUser: 1000
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "2"
memory: "4Gi"
ports:
- containerPort: 8080
volumeMounts:
- name: trino-config
mountPath: /etc/trino/config.properties
subPath: config.properties
- name: iceberg-lakehouse-catalog
mountPath: /etc/trino/catalog/iceberg_lakehouse.properties
subPath: iceberg_lakehouse.properties
volumes:
🤖 Prompt for AI Agents
In examples/kafka-connect-iceberg-sink/trino/trino-deployment.yaml around lines
19 to 32, the Trino container lacks a securityContext and resource
requests/limits; update the container (and optionally pod) spec to harden it by
adding a securityContext with runAsNonRoot: true, runAsUser set to a non-root
UID (e.g. 1000), readOnlyRootFilesystem: true, allowPrivilegeEscalation: false,
and capabilities.drop: ["ALL"]; mark config volumeMounts that should not be
written as readOnly: true; and add resources.requests and resources.limits for
cpu and memory (e.g. sensible values for your cluster) so the pod is not allowed
to starve or overcommit resources.

@yohanvalencia yohanvalencia changed the title Add example - k8s iceberg sink connector (avro) feat(examples): add k8s iceberg sink connector (avro) Sep 14, 2025
@yohanvalencia

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (13)
examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml (2)

13-21: Run as non‑root with minimal privileges.

Add pod/container securityContext: no escalation, drop caps; set seccomp. Aligns with Baseline Pod Security.

   template:
     metadata:
       labels:
         app: migrate
     spec:
+      securityContext:
+        runAsNonRoot: true
+        seccompProfile: { type: RuntimeDefault }
       restartPolicy: Never
       containers:
       - name: migrate
         image: quay.io/lakekeeper/catalog:latest-main
         imagePullPolicy: IfNotPresent
+        securityContext:
+          runAsUser: 1000
+          allowPrivilegeEscalation: false
+          readOnlyRootFilesystem: true
+          capabilities: { drop: ["ALL"] }

24-30: Seal secrets: move encryption key and DB URLs to a Secret.

Avoid committing keys/credentials; reference via secretKeyRef. Same Secret can be reused by serve.yaml.

         env:
-        - name: LAKEKEEPER__PG_ENCRYPTION_KEY
-          value: "This-is-NOT-Secure!"
-        - name: LAKEKEEPER__PG_DATABASE_URL_READ
-          value: "postgresql://postgres:[email protected]:5432/catalog"
-        - name: LAKEKEEPER__PG_DATABASE_URL_WRITE
-          value: "postgresql://postgres:[email protected]:5432/catalog"
+        - name: LAKEKEEPER__PG_ENCRYPTION_KEY
+          valueFrom: {secretKeyRef: {name: lakekeeper-secrets, key: pg_encryption_key}}
+        - name: LAKEKEEPER__PG_DATABASE_URL_READ
+          valueFrom: {secretKeyRef: {name: lakekeeper-secrets, key: pg_url_read}}
+        - name: LAKEKEEPER__PG_DATABASE_URL_WRITE
+          valueFrom: {secretKeyRef: {name: lakekeeper-secrets, key: pg_url_write}}

Add Secret (examples/kafka-connect-iceberg-sink/lakekeeper/secret.yaml):

apiVersion: v1
kind: Secret
metadata:
  name: lakekeeper-secrets
  namespace: catalog
type: Opaque
stringData:
  pg_encryption_key: change-me
  pg_url_read: postgresql://postgres:[email protected]:5432/catalog
  pg_url_write: postgresql://postgres:[email protected]:5432/catalog
examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml (2)

17-26: Add pod/container securityContext.

Run as non‑root, drop caps, disable escalation, and prefer read‑only root FS.

   template:
     metadata:
       labels:
         app: lakekeeper
     spec:
+      securityContext:
+        runAsNonRoot: true
+        seccompProfile: { type: RuntimeDefault }
       containers:
       - name: lakekeeper
         image: quay.io/lakekeeper/catalog:latest-main
         imagePullPolicy: IfNotPresent
+        securityContext:
+          runAsUser: 1000
+          allowPrivilegeEscalation: false
+          capabilities: { drop: ["ALL"] }
+          readOnlyRootFilesystem: true

34-41: Pull DB URLs and encryption key from a Secret.

Prevent credential/key leakage and fix CKV_SECRET_4.

         env:
-        - name: LAKEKEEPER__PG_ENCRYPTION_KEY
-          value: "This-is-NOT-Secure!"
-        - name: LAKEKEEPER__PG_DATABASE_URL_READ
-          value: "postgresql://postgres:[email protected]:5432/catalog"
-        - name: LAKEKEEPER__PG_DATABASE_URL_WRITE
-          value: "postgresql://postgres:[email protected]:5432/catalog"
+        - name: LAKEKEEPER__PG_ENCRYPTION_KEY
+          valueFrom: {secretKeyRef: {name: lakekeeper-secrets, key: pg_encryption_key}}
+        - name: LAKEKEEPER__PG_DATABASE_URL_READ
+          valueFrom: {secretKeyRef: {name: lakekeeper-secrets, key: pg_url_read}}
+        - name: LAKEKEEPER__PG_DATABASE_URL_WRITE
+          valueFrom: {secretKeyRef: {name: lakekeeper-secrets, key: pg_url_write}}
examples/kafka-connect-iceberg-sink/docker/producer/Dockerfile (1)

10-13: Good hardening and operability.

Unbuffered logging + non‑root user look good; thanks for incorporating earlier feedback.

examples/kafka-connect-iceberg-sink/Makefile (4)

37-38: Fix confirmed: delete-namespace now deletes.

This resolves the previous no-op. Nice.


66-69: Pin Strimzi version and respect $(NAMESPACE) in URL.

Avoid surprises from “latest” and ensure install targets your namespace variable.

-install-kafka:
-	kubectl create -f 'https://strimzi.io/install/latest?namespace=kafka' -n $(NAMESPACE)
+STRIMZI_VERSION ?= 0.41.0
+install-kafka:
+	kubectl create -f "https://strimzi.io/install/$(STRIMZI_VERSION)?namespace=$(NAMESPACE)" -n $(NAMESPACE)

70-74: Wait for Kafka brokers before dependents.

Prevents races for Schema Registry/topics.

 	kubectl apply -f kafka/cluster.yaml
+	@echo "⏳ Waiting for Kafka brokers to be ready..."
+	kubectl rollout status statefulset/my-cluster-kafka -n $(NAMESPACE)
 	kubectl apply -f kafka/schema-registry.yaml
 	kubectl apply -f kafka/topics.yaml

75-78: Apply KafkaConnect first, wait Ready, then create KafkaConnector.

Reduces flakiness when the connector is created before Connect is ready.

-	kubectl apply -f kafka/schema-registry-init.yaml
-	kubectl apply -f kafka/kafka-connect.yaml
+	kubectl apply -f kafka/schema-registry-init.yaml
+	# Apply KafkaConnect only and wait
+	kubectl apply -f kafka/kafka-connect.yaml --dry-run=client -o yaml | yq 'select(.kind=="KafkaConnect")' | kubectl apply -f -
+	kubectl wait kafkaconnect.kafka.strimzi.io/kafka-connect -n $(NAMESPACE) --for=condition=Ready --timeout=300s
+	# Now apply KafkaConnector (same file contains it)
+	kubectl apply -f kafka/kafka-connect.yaml
examples/kafka-connect-iceberg-sink/storage/postgres.yaml (2)

25-31: Move DB credentials to a Secret (avoid plaintext in Git).

Inline POSTGRES_USER/PASSWORD/DB are committed; use a Secret and reference via envFrom/valueFrom.

Apply:

         env:
-        - name: POSTGRES_USER
-          value: "postgres"
-        - name: POSTGRES_PASSWORD
-          value: "postgres"
-        - name: POSTGRES_DB
-          value: "catalog"
+        envFrom:
+        - secretRef:
+            name: postgres-secret

Add Secret (new file examples/kafka-connect-iceberg-sink/storage/postgres-secret.yaml):

apiVersion: v1
kind: Secret
metadata:
  name: postgres-secret
  namespace: storage
type: Opaque
stringData:
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: postgres
  POSTGRES_DB: catalog

20-31: Harden container securityContext (non‑root, no caps, no escalation).

Run Postgres as its intended UID/GID (999), drop caps, and disable privilege escalation. Aligns with Baseline Pod Security and clears CKV_K8S_20/23.

       - name: postgres
         image: postgres:16
+        securityContext:
+          runAsNonRoot: true
+          allowPrivilegeEscalation: false
+          capabilities: { drop: ["ALL"] }
+          runAsUser: 999
+          runAsGroup: 999
+        # ensure volume writes succeed
+        # (alternatively set pod-level fsGroup)
examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml (2)

16-21: Harden the Deployment: non-root, drop caps, block privilege escalation.

Same rationale as earlier; aligns with Checkov findings. (Repeating prior suggestion.)

     spec:
-      containers:
+      securityContext:
+        runAsNonRoot: true
+        runAsUser: 10001
+        fsGroup: 10001
+        seccompProfile:
+          type: RuntimeDefault
+      containers:
         - name: internal-schema-registry
           image: confluentinc/cp-schema-registry:8.0.0
+          securityContext:
+            allowPrivilegeEscalation: false
+            readOnlyRootFilesystem: true
+            capabilities:
+              drop: ["ALL"]
           ports:
             - containerPort: 8085

Also applies to: 17-37


20-36: Add resources and health probes for stability.

Improves rollout behavior and readiness in demos. (Repeating earlier recommendation.)

           ports:
             - containerPort: 8085
+          resources:
+            requests:
+              cpu: 100m
+              memory: 256Mi
+            limits:
+              cpu: 500m
+              memory: 512Mi
+          livenessProbe:
+            httpGet:
+              path: /health
+              port: 8085
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          readinessProbe:
+            httpGet:
+              path: /health
+              port: 8085
+            initialDelaySeconds: 5
+            periodSeconds: 5
🧹 Nitpick comments (13)
examples/kafka-connect-iceberg-sink/storage/postgres.yaml (2)

32-51: Probe polish: use POSTGRES_DB and simplify exec.

Make liveness/readiness consistent and parametric to reduce drift if DB name changes.

-          exec:
-            command:
-            - /bin/sh
-            - -c
-            - pg_isready -U postgres -p 5432 -d postgres
+          exec:
+            command: ["pg_isready","-U","postgres","-p","5432","-d","${POSTGRES_DB:-postgres}"]
@@
-          exec:
-            command:
-            - /bin/sh
-            - -c
-            - pg_isready -U postgres -p 5432 -d catalog
+          exec:
+            command: ["pg_isready","-U","postgres","-p","5432","-d","${POSTGRES_DB:-postgres}"]

56-58: Consider PVC over emptyDir if you want restart persistence.

emptyDir wipes data on pod restart; for demos it’s fine, but a PVC avoids migration/bootstraps after restarts.

Happy to provide a PVC patch if you want persistence.

examples/kafka-connect-iceberg-sink/producer/producer.yaml (1)

12-19: Harden Job pod/container security; add modest resources.

Run as non‑root with no caps; give small requests/limits to aid scheduling.

   template:
     spec:
+      securityContext:
+        runAsNonRoot: true
+        seccompProfile: { type: RuntimeDefault }
       restartPolicy: Never
       containers:
         - name: producer
           image: producer:latest
           imagePullPolicy: Never
+          securityContext:
+            runAsUser: 10001
+            allowPrivilegeEscalation: false
+            capabilities: { drop: ["ALL"] }
+          resources:
+            requests: { cpu: "100m", memory: "128Mi" }
+            limits:   { cpu: "500m", memory: "256Mi" }
examples/kafka-connect-iceberg-sink/kafka/cluster.yaml (1)

33-35: Validate Strimzi/Kafka compatibility.

Kafka 4.0.0 and metadataVersion 4.0-IV3 require a matching Strimzi operator. You’re currently installing “latest” in the Makefile; please pin a Strimzi version that supports this Kafka version.

If helpful, I can patch the Makefile to pin a compatible Strimzi and switch the install URL to use $(NAMESPACE).

examples/kafka-connect-iceberg-sink/Makefile (1)

10-12: Declare PHONY targets.

Quiet checkmake and avoid file/target name collisions.

-.PHONY:
+.PHONY: all build-images destroy cluster delete-cluster install-namespace delete-namespace \
+install-storage build-producer-image run-producer stop-producer build-kafka-connect \
+install-kafka install-catalog install-trino
examples/kafka-connect-iceberg-sink/producer/main.py (3)

29-31: Throughput default contradicts help; make 0 mean “unlimited.”

Current default is 100,000,000 yet help says unlimited. Use 0 for unlimited.

-parser.add_argument('--throughput', type=int, default=100_0000_000, 
-                    help='Target throughput in messages per second (default: unlimited)')
+parser.add_argument('--throughput', type=int, default=0,
+                    help='Target throughput in messages per second (0 = unlimited)')

66-68: Prefer logging.exception for schema fetch failures.

Keeps traceback while staying concise.

-except Exception as e:
-    logger.error(f"Failed to fetch schema: {e}")
+except Exception:
+    logger.exception("Failed to fetch schema")
     sys.exit(1)

129-136: Remove duplicated progress log computation.

The block re-logs the same stats twice.

-        if (i + 1) % 1000 == 0:
-            rate = (i + 1) / elapsed if elapsed > 0 else 0
-            logger.info(f"Produced {i + 1} messages... (Rate: {rate:.2f} msg/s)")
-            producer.poll(0)
-            elapsed = time.time() - start_time
-            rate = (i + 1) / elapsed if elapsed > 0 else 0
-            logger.info(f"Produced {i + 1} messages... (Rate: {rate:.2f} msg/s)")
+        if (i + 1) % 1000 == 0:
+            rate = (i + 1) / elapsed if elapsed > 0 else 0
+            logger.info(f"Produced {i + 1} messages... (Rate: {rate:.2f} msg/s)")
examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml (4)

47-50: Fail fast on HTTP errors during registration.

Add -sSf (and Accept) to curl so non-2xx responses fail the Job instead of slipping through.

-              RESPONSE=$(curl -X POST \
-                -H "Content-Type: application/vnd.schemaregistry.v1+json" \
-                -d @/tmp/payload.json \
-                http://internal-schema-registry:8085/subjects/events-value/versions)
+              RESPONSE=$(curl -sSf -X POST \
+                -H "Content-Type: application/vnd.schemaregistry.v1+json" \
+                -H "Accept: application/vnd.schemaregistry.v1+json" \
+                -d @/tmp/payload.json \
+                http://internal-schema-registry:8085/subjects/events-value/versions)

54-60: Make registration idempotent to avoid noisy retries.

If this Job runs twice, the second run may return a different body or error. Consider skipping registration when the latest subject schema matches.

+              # If subject exists with same schema, skip
+              if curl -sSf http://internal-schema-registry:8085/subjects/events-value/versions/latest > /dev/null 2>&1; then
+                echo "Subject exists; attempting register anyway (Schema Registry will dedupe)."
+              fi

If you prefer strict idempotency, fetch latest and compare, then conditionally POST. I can provide the fuller snippet on request.


10-16: Harden the Job: run as non-root, drop caps, disallow privilege escalation.

Addresses CKV_K8S_20 and CKV_K8S_23.

   template:
     spec:
+      securityContext:
+        runAsNonRoot: true
+        runAsUser: 10001
+        fsGroup: 10001
+        seccompProfile:
+          type: RuntimeDefault
       restartPolicy: Never
       containers:
         - name: register-schema
           image: confluentinc/cp-schema-registry:8.0.0
+          securityContext:
+            allowPrivilegeEscalation: false
+            readOnlyRootFilesystem: true
+            capabilities:
+              drop: ["ALL"]
           command: ['sh', '-c']

Also applies to: 13-16, 17-17


13-16: Set minimal resources to improve scheduling predictability.

Even tiny requests help on Kind and CI clusters.

         - name: register-schema
           image: confluentinc/cp-schema-registry:8.0.0
+          resources:
+            requests:
+              cpu: 50m
+              memory: 64Mi
+            limits:
+              cpu: 200m
+              memory: 128Mi
examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml (1)

31-32: Typo in env var name: property won’t be applied.

Use SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL (not SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL). It’s benign in single-replica but confusing.

-            - name: SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
-              value: "http"
+            - name: SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL
+              value: "http"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2561790 and dd0d044.

📒 Files selected for processing (14)
  • examples/kafka-connect-iceberg-sink/Makefile (1 hunks)
  • examples/kafka-connect-iceberg-sink/README.md (1 hunks)
  • examples/kafka-connect-iceberg-sink/docker/producer/Dockerfile (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/cluster.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/lakekeeper/bootstrap.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/README.md (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/main.py (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/producer.yaml (1 hunks)
  • examples/kafka-connect-iceberg-sink/producer/pyproject.toml (1 hunks)
  • examples/kafka-connect-iceberg-sink/storage/postgres.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • examples/kafka-connect-iceberg-sink/producer/README.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • examples/kafka-connect-iceberg-sink/producer/pyproject.toml
  • examples/kafka-connect-iceberg-sink/README.md
  • examples/kafka-connect-iceberg-sink/lakekeeper/bootstrap.yaml
🧰 Additional context used
🪛 Checkov (3.2.334)
examples/kafka-connect-iceberg-sink/producer/producer.yaml

[medium] 1-29: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-29: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml

[medium] 2-60: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-60: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml

[medium] 2-37: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-37: Minimize the admission of root containers

(CKV_K8S_23)

examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml

[medium] 1-32: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-32: Minimize the admission of root containers

(CKV_K8S_23)


[medium] 28-29: Basic Auth Credentials

(CKV_SECRET_4)

examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml

[medium] 1-55: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 1-55: Minimize the admission of root containers

(CKV_K8S_23)


[medium] 38-39: Basic Auth Credentials

(CKV_SECRET_4)

examples/kafka-connect-iceberg-sink/storage/postgres.yaml

[medium] 2-59: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 2-59: Minimize the admission of root containers

(CKV_K8S_23)

🪛 checkmake (0.2.2)
examples/kafka-connect-iceberg-sink/Makefile

[warning] 18-18: Target body for "cluster" exceeds allowed length of 5 (7).

(maxbodylength)


[warning] 17-17: Missing required phony target "all"

(minphony)


[warning] 17-17: Missing required phony target "clean"

(minphony)


[warning] 17-17: Missing required phony target "test"

(minphony)


[warning] 10-10: Target "all" should be declared PHONY.

(phonydeclared)


[warning] 12-12: Target "destroy" should be declared PHONY.

(phonydeclared)

🪛 Ruff (0.12.2)
examples/kafka-connect-iceberg-sink/producer/main.py

66-66: Do not catch blind exception: Exception

(BLE001)


67-67: Use logging.exception instead of logging.error

Replace with exception

(TRY400)


108-108: Standard pseudo-random generators are not suitable for cryptographic purposes

(S311)


109-109: Standard pseudo-random generators are not suitable for cryptographic purposes

(S311)


110-110: Standard pseudo-random generators are not suitable for cryptographic purposes

(S311)

🔇 Additional comments (4)
examples/kafka-connect-iceberg-sink/lakekeeper/migrate.yaml (1)

21-23: Resource requests/limits present — good.

These bounds help scheduling and avoid noisy neighbors.

examples/kafka-connect-iceberg-sink/lakekeeper/serve.yaml (1)

27-33: Resources defined — nice.

Sensible defaults for demo; keep or tune as needed.

examples/kafka-connect-iceberg-sink/kafka/schema-registry-init.yaml (1)

19-34: Nice: bounded wait + strict shell options implemented.

Using set -euo pipefail and a MAX_WAIT_SEC loop prevents hanging Jobs. Looks good.

examples/kafka-connect-iceberg-sink/kafka/schema-registry.yaml (1)

23-24: Correct bootstrap target.

Using my-cluster-kafka-bootstrap:9092 is the right endpoint for clients in Strimzi.

@yohanvalencia
yohanvalencia force-pushed the kafka-connect-iceberg-sink branch from d289633 to 986ef28 Compare September 19, 2025 20:39
@yohanvalencia
yohanvalencia force-pushed the kafka-connect-iceberg-sink branch from 986ef28 to b161066 Compare October 6, 2025 18:54
@c-thiel

c-thiel commented Oct 7, 2025

Copy link
Copy Markdown
Member

It seems I can make it work either with podman or with docker.
I am opting for docker now. On podman it can't find the images we load into the clsuter.

@c-thiel c-thiel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yohanvalencia!

@c-thiel
c-thiel merged commit 41ec6aa into lakekeeper:main Oct 7, 2025
@c-thiel c-thiel changed the title feat(examples): add k8s iceberg sink connector (avro) docs: add k8s iceberg sink connector (avro) Oct 14, 2025
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR match the correct format. Thank you!

mrjoe7 added a commit to mrjoe7/lakekeeper that referenced this pull request Oct 30, 2025
* feat: Publish images to Dockerhub (lakekeeper#1274)

* feat: Update UI to 0.9.0 with multi-project support (lakekeeper#1275)

* chore: release 0.9.4

Release-As: 0.9.4

* chore: release main (lakekeeper#1262)

* chore(ci): Fix Dockerhub login

* chore(docs): Improve developer guide (lakekeeper#1265)

* chore(docs): add info regarding `view_version`'s internal representation (lakekeeper#1261)

* chore(docs): Architecture clarify Secret Store (lakekeeper#1284)

* fix: Update Limes to 0.2.2 - Fixes compilation issue due to breaking `jwks_client_rs` change (lakekeeper#1282)

* fix: Update Limes to 0.2.2

* increase min rust version

* chore: release 0.9.5

Release-As: 0.9.5

* chore: release main (lakekeeper#1286)

* chore: enable changelog sections for release-please (lakekeeper#1264)

k

* fix(deps): update rust crate rand to v0.9.2 (lakekeeper#1252)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-channel to v2.5.0 (lakekeeper#1225)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mkdocs-material to v9.6.17 (lakekeeper#1289)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate anyhow to v1.0.99 (lakekeeper#1290)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: Remove bitnami images (lakekeeper#1288)

* feat!: Move to Lakekeeper IO based on hyperscaler SDKs (lakekeeper#1285)

* chore(deps): update rust crate reqwest to v0.12.23 (lakekeeper#1294)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(docs): Improve Cloud storage test docs

* fix: accept "disable" as PG sslmode as documented (lakekeeper#1303)

* feat: Simplify task interface, re-exports, enable delete-after-commit (lakekeeper#1302)

* feat: Introduce `RequestMetadata` for Internal Principals which bypass AuthZ (lakekeeper#1306)

* chore(deps): update azure/setup-helm action to v4.3.1 (lakekeeper#1299)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(test): use nextest filterset instead of needs_env_var (lakekeeper#1304)

* chore(deps): update rust crate openssl-src to v300.5.2 (lakekeeper#1292)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-compression to v0.4.28 (lakekeeper#1311)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate thiserror to v2.0.16 (lakekeeper#1296)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Provide `ApiContext` to externally registered tasks (lakekeeper#1307)

* feat!: Simplify Task interface, extend SpecializedTask interface (lakekeeper#1310)

* feat: Improve authorizer `are_allowed_*` batch check signature (lakekeeper#1315)

* chore(authz): Enforce use of AuthZ decisions with #[must_use] (lakekeeper#1317)

* feat: Task Management APIs (lakekeeper#1316)

* chore(deps): update rust crate tracing-subscriber to v0.3.20 [security] (lakekeeper#1318)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Add `RunNow` and `RunAt` to Controls for Tasks (lakekeeper#1322)

* chore(deps): update rust crate tokio-util to v0.7.16 (lakekeeper#1313)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(docs): Improve Entra ID docs (lakekeeper#1325)

* chore(docs): Improve Upgrades & Migration docs (lakekeeper#1326)

* feat: Add tasks heartbeat with Catalog state (lakekeeper#1324)

* ci: add configuration for CodeRabbit reviews (lakekeeper#1327)

* feat: Add optional STS session-tags in S3 STS requests for ABAC authorization (lakekeeper#1230)

* feat: Random Server IDs (lakekeeper#1328)

* chore(deps): update rust crate percent-encoding to v2.3.2 (lakekeeper#1312)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(authz): Deprecate Permission Endpoints for Tables without WarehouseIDs (lakekeeper#1334)

* fix: Tasks endpoints in router (lakekeeper#1335)

* feat(ci): add nextest profile ci_no_secrets for external PRs (lakekeeper#1333)

* chore(deps): update rust crate chrono to v0.4.42 (lakekeeper#1331)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: Pin examples duckdb version to 1.3 (lakekeeper#1343)

* feat!: Require warehouse_id when checking permissions on views or tables via ID (lakekeeper#1340)

* fix: migrate away from bitnami in unittest.yml (lakekeeper#1344)

* chore: Remove coderabitt config

* fix(docs): Fix inconsistent URL format in README (lakekeeper#1345)

Co-authored-by: Christian <[email protected]>

* feat: Remove serde_yaml & serde_yml (lakekeeper#1341)

* feat!: add `warehouse_id` to PKs of all `table_*` and `view_*` tables (lakekeeper#1254)

* feat: Minor namespace join performance improvements

* fix: Warehouse permissions are directly used for task retrieval & control (lakekeeper#1347)

* fix: Potential Race Condition when undropping Tabulars (lakekeeper#1342)

* fix: table rename authz and error handling (lakekeeper#1346)

Co-authored-by: Andre Luis Anastacio <[email protected]>

* chore(deps): update rust crate google-cloud-auth to v1.1.2 (lakekeeper#1337)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update rust crate time to v0.3.44 (lakekeeper#1349)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mkdocs-material to v9.6.20 (lakekeeper#1309)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* feat: Set ServerID during migration (lakekeeper#1348)

* chore(deps): Remove utoipa fork (lakekeeper#1352)

* chore(deps): update rust crate serde_with to v3.14.1 (lakekeeper#1351)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate url to v2.5.7 (lakekeeper#1354)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-compression to v0.4.30 (lakekeeper#1323)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update rust crate serde_json to v1.0.145 (lakekeeper#1250)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update strum monorepo to v0.27.2 (lakekeeper#1251)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update serde monorepo to v1.0.226 (lakekeeper#1355)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update rust crate clap to v4.5.48 (lakekeeper#1356)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Add Entity Names to Tasks (lakekeeper#1353)

* fix: case insensitivity of catalog endpoints (lakekeeper#1338)

* fix: Improve delete_warehouse error message for active tasks

* chore(deps): update rust crate tempfile to v3.22.0 (lakekeeper#1359)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update rust crate axum-prometheus to 0.9.0 (lakekeeper#1358)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: PgSslMode not supported error string

* feat(authz)!: add OpenFGA schema v4 and v3->v4 migration (lakekeeper#1314)

Co-authored-by: Christian <[email protected]>
Co-authored-by: Christian Thiel <[email protected]>

* chore(deps): update rust crate uuid to v1.18.1 (lakekeeper#1362)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency markdown-grid-tables to v0.6.0 (lakekeeper#1357)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate anyhow to v1.0.100 (lakekeeper#1350)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: clippy

* chore(deps): update rust crate moka to v0.12.11 (lakekeeper#1365)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate tempfile to v3.23.0 (lakekeeper#1367)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-nats to 0.43.0 (lakekeeper#1366)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-node action to v5 (lakekeeper#1371)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/checkout action to v5 (lakekeeper#1369)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-python action to v6 (lakekeeper#1372)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: V3 support (lakekeeper#1364)

* chore: Set Get Task Permission to "CanGetMetadata" (lakekeeper#1376)

* chore(deps): update dependency node to v22 (lakekeeper#1373)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(authz)!: extend OpenFGA tabular entities with WarehouseId (lakekeeper#1329)


---------

Co-authored-by: Christian <[email protected]>
Co-authored-by: Christian Thiel <[email protected]>

* feat: Add support for tasks affecting views (lakekeeper#1378)

* feat(authz): Add specific Task Actions (lakekeeper#1379)

* chore(tests): Test with Iceberg 1.9.2 & 1.10.0 (lakekeeper#1267)

* feat: Enrich task metadata with concrete tabular type (lakekeeper#1383)

* feat: Add loadTable Snapshots filter (lakekeeper#1385)

* feat: add endpoint for fuzzy search of tabulars (lakekeeper#1387)

* feat: Update UI to 0.10.0 (lakekeeper#1390)

* feat(ui): Update UI to 0.10.1

* chore: Use lakekeeper re-exports in bin (lakekeeper#1391)

* fix(tabular-search): distance and docs for `searchterm is uuid` (lakekeeper#1393)

* chore(examples): Idempotent bucket creation in minimal example (lakekeeper#1386)

In the case where you already have a bucket created, like the "examples" bucket, I ran into an issue where the createbuckets service fails, and this prevents lakekeeper from starting back up.

This fix adds a simple minio flag to ignore buckets that already exist, making things even more user friendly

* feat: Make number of workers spawned for Expiration & Purge configurable (lakekeeper#1395)

* chore: release main (lakekeeper#1295)

* chore: added gif to readme (lakekeeper#1396)

* chore: remove unneded `#[allow(dead_code)]` (lakekeeper#1399)

* fix: Use FnOnce for queue & service registration

* Revert "fix: Use FnOnce for queue & service registration"

This reverts commit 47b03a0.

* chore(docs): Add 0.10 docs

* perf(db): remove `join namespace` from `active_tabulars` view (lakekeeper#1401)

* doc(db): how to connect to db and inspect schema (lakekeeper#1402)

* feat: implement `OpenFgaEntity` for `ServerId` (lakekeeper#1394)

* impl OpenFgaEntity
* Use the implementation

* fix: Use FnOnce for queue & service registration (lakekeeper#1404)

* chore(deps): update dependency mkdocs-material to v9.6.21 (lakekeeper#1406)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Expose client-managed X-Iceberg-Access-Delegation (lakekeeper#1407)

* fix: Use higher consistency for some OpenFGA queries (lakekeeper#1408)

* feat: Improve Kubernetes Auth docs (lakekeeper#1415)

* chore: release 0.10.1

Release-As: 0.10.1

* fix: Endpoint stats for Project Endpoints (lakekeeper#1412)

* feat: Add create table guard to cleanup location on Failure (lakekeeper#1418)

* chore: Generate ID types with Macro (lakekeeper#1419)

* chore: Re-Export Tokio from lakekeeper-io create (lakekeeper#1420)

* fix: Add support for `write.metadata.metrics.` Table Properties (lakekeeper#1422)

* fix: Update UI to 0.10.2 (lakekeeper#1423)

* chore: release main (lakekeeper#1403)

* fix: Parse empty ProjectID headers as None (lakekeeper#1424)

* chore: release 0.10.2

Release-As: 0.10.2

* chore: release main (lakekeeper#1425)

* feat: Add `debug_migrate_before_serve` env var (lakekeeper#1426)

* feat: Move OpenFGA Authorizer to separate crate (lakekeeper#1421)

* chore(renovate): Group dependencies

* chore(renovate): ignore additional deps

* chore: Rename src/service -> src/server, trait Catalog -> CatalogStore (lakekeeper#1428)

* feat(examples): add k8s iceberg sink connector (avro) (lakekeeper#1336)


---------

Co-authored-by: Christian <[email protected]>

* chore(ci): Fix release please (lakekeeper#1433)

* feat: Expose License Information via API (lakekeeper#1432)

* fix(deps): update all non-major dependencies (lakekeeper#1429)

* chore(ci): Remove mgmt API version update via release-please

* chore: Restructure catalog_store into multiple modules (lakekeeper#1434)

* feat: Validate Downscoping works on Warehouse creation (lakekeeper#1437)

* chore(ci): Fix release please

* docs: Add info about installing sqlx to developer-guide.md (lakekeeper#1438)

* docs: Update developer-guide.md (lakekeeper#1439)

* chore(deps): update all non-major dependencies (lakekeeper#1436)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: Better normalization for ARNs in S3 Profile (lakekeeper#1441)

* chore(deps): update all non-major dependencies (lakekeeper#1442)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(main): release 0.10.3 (lakekeeper#1427)

* fix: Release Please CI outputs

* fix(ci): Revert 0.10.3 release

* chore(main): release 0.10.3 (lakekeeper#1446)

* feat: Introduce CatalogWarehouseOps & CatalogNamespaceOps abstractions (lakekeeper#1440)

* feat: Allow x-user-agent header (lakekeeper#1453)

* feat: Table & View Ops Abstractions, Improved Error Handling (lakekeeper#1454)

* fix: CORS allow access delegation & etag headers (lakekeeper#1455)

* fix: Headers should be lowercase (lakekeeper#1457)

* chore(tests): Add trino information_schema.tables test (lakekeeper#1456)

* chore: Introduce open-api feature to gate utoipa and swagger (lakekeeper#1458)

* chore: Release As 0.11

* fix: Debug assertion table identifier mismatch for signer (lakekeeper#1460)

* feat: Caching Short-Term-Credentials (STC) (lakekeeper#1459)

* feat: Warehouse Cache (lakekeeper#1462)

* chore(deps): update actions/setup-node action to v6 (lakekeeper#1443)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Version based Warehouse Cache (lakekeeper#1465)

* feat: AuthZ Server and Project Ops (lakekeeper#1471)

* chore(deps): update github artifact actions (lakekeeper#1461)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: Rename release branch pattern to rel-*

* feat: Catalog returns full Namespace Hierarchy for nested Namespaces (lakekeeper#1472)

---------

Co-authored-by: Christian <[email protected]>
Co-authored-by: Christian Thiel <[email protected]>
Co-authored-by: Dao Thanh Tung <[email protected]>
Co-authored-by: Moritz Zielke <[email protected]>
Co-authored-by: Baptiste Gouhoury <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dolan Antenucci <[email protected]>
Co-authored-by: Anatoly Popov <[email protected]>
Co-authored-by: Andre Luis Anastacio <[email protected]>
Co-authored-by: Scott Haines <[email protected]>
Co-authored-by: Viktor Kessler <[email protected]>
Co-authored-by: Yohan Valencia <[email protected]>
Co-authored-by: Paul Roman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants