Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
7ffe21e
fix stop the services command
zedach Jan 20, 2026
4b55f48
no need for external project
zedach Jan 20, 2026
b715a78
no need for starlake-proxy
zedach Jan 28, 2026
e18bd8e
add Kubernetes starlake CLI wrapper script
zedach Jan 28, 2026
7cc86be
add Kubernetes-compatible Airflow Dockerfile
zedach Jan 28, 2026
4e90abd
add Helm chart base structure
zedach Jan 28, 2026
7fd0006
add PostgreSQL StatefulSet templates
zedach Jan 28, 2026
747cc48
add Airflow deployment templates
zedach Jan 28, 2026
14b50d6
add Starlake UI deployment templates
zedach Jan 28, 2026
397d6f3
add Agent and Gizmo deployment templates
zedach Jan 28, 2026
303bf9f
add Helm chart test automation scripts
zedach Jan 28, 2026
1362fc6
increase Airflow memory limits to 4Gi request / 16Gi limit
zedach Jan 29, 2026
a2965fe
add AIRFLOW__WEBSERVER__SECRET_KEY to Airflow deployment
zedach Jan 29, 2026
314d9cc
update Helm documentation
zedach Jan 29, 2026
a1ab3f3
fix shared volume permissions for multi-user access
zedach Jan 29, 2026
37b5ae1
fix pod readiness check for multi-container pods
zedach Jan 29, 2026
751ae05
add RBAC for Kubernetes Job execution mode in Airflow
zedach Jan 29, 2026
2256163
add Job template ConfigMap for Starlake tasks
zedach Jan 29, 2026
3fa5bdc
add starlake-k8s wrapper script
zedach Jan 29, 2026
5fecd63
mount Job Runner configs and install kubectl
zedach Jan 29, 2026
3d551f5
add Job template ConfigMap for Starlake tasks
zedach Jan 29, 2026
38f7a5f
add starlake-k8s wrapper script
zedach Jan 29, 2026
0d65c43
mount Job Runner configs and install kubectl
zedach Jan 29, 2026
0881ecd
add job runner environment variables and service account token
zedach Jan 30, 2026
48d6425
fix security issues in starlake-k8s wrapper script
zedach Jan 30, 2026
36d9ac7
enable job runner by default in test script
zedach Jan 30, 2026
81383cd
update gitignore
zedach Jan 30, 2026
628f227
update Airflow K8s image to 2.11.0 and pin starlake-airflow 0.4
zedach Jan 30, 2026
d8585bc
rewrite starlake-k8s wrapper with SL_* env vars and options handling
zedach Jan 30, 2026
1019e16
update Job Runner to use starlakeai/starlake:1.5.3-SNAPSHOT
zedach Jan 30, 2026
fd3ab4c
add kubectl install and mount job-template ConfigMap
zedach Jan 30, 2026
c18555c
enable jobRunner in test script
zedach Jan 30, 2026
499a008
security: remove hardcoded AWS credentials from Dockerfiles
zedach Jan 31, 2026
92bc092
security: fix SQL injection using psql variables in entrypoint.sh
zedach Jan 31, 2026
ee32006
update gitignore
zedach Jan 31, 2026
85e94ab
use Kubernetes Secret for Airflow admin password
zedach Jan 31, 2026
410766a
add credential validation for production deployments
zedach Jan 31, 2026
210b06e
add security validation tests with --production and --security-only …
zedach Jan 31, 2026
27344d3
update gitignore
zedach Jan 31, 2026
5046551
move mail and docs passwords to Kubernetes Secret
zedach Jan 31, 2026
208fe70
add shebang and set -euo pipefail to shell scripts
zedach Jan 31, 2026
a4131d0
add SHA256 checksum verification for kubectl download
zedach Jan 31, 2026
136b212
remove --validate=false from kubectl apply
zedach Jan 31, 2026
26a32bd
add agent.applicationKey validation for production
zedach Jan 31, 2026
b1fda24
add agent.applicationKey to secure credentials generation
zedach Jan 31, 2026
3e7cdc5
enable networkPolicy and use ClusterIP service type by default
zedach Jan 31, 2026
fe08d87
pin Docker image versions (PostgreSQL 17.2, Alpine 3.21, Debian 12, C…
zedach Feb 2, 2026
ffe7ebb
upgrade BusyBox 1.35 to 1.36 (CVE-2022-28391)
zedach Feb 2, 2026
63e061b
add hostNetwork support for SQL ports 11900-12000
zedach Feb 2, 2026
f2c49b5
expose Gizmo SQL ports 11900-11920 in K3d cluster
zedach Feb 2, 2026
edf9396
add hostNetwork and nodeSelector support for SQL ports 11900-12000
zedach Feb 2, 2026
fa24df8
update gitignore
zedach Feb 2, 2026
1c03879
translate documentation to English
zedach Feb 2, 2026
8487fab
add multi-node K3s cluster support with --multi-node option
zedach Feb 2, 2026
4563350
update gitignore
zedach Feb 2, 2026
b493c11
add SeaweedFS S3 object storage support with Hadoop S3A configuration
zedach Feb 12, 2026
4b8a9aa
fix S3A chunked encoding bug with V2 signing and add DuckDB S3 secret
zedach Feb 12, 2026
ea9388d
add nodeSelector and tolerations support for airflow, agent and gizmo
zedach Feb 12, 2026
49c5192
add component label helpers and update ingress for SeaweedFS
zedach Feb 12, 2026
8063586
add SeaweedFS test mode and S3 regression test script
zedach Feb 12, 2026
1fe8cdf
update Airflow K8s Dockerfile and add SeaweedFS documentation
zedach Feb 12, 2026
404d48b
externalize init container image versions to values.yaml
zedach Feb 12, 2026
d628773
externalize busybox and DuckDB versions in UI deployment
zedach Feb 12, 2026
2a2cbcf
externalize busybox version in Airflow deployment
zedach Feb 12, 2026
ce7e211
add SeaweedFS credential validation and externalize init image versions
zedach Feb 12, 2026
8a1fc3e
add strict shell mode to test-helm-chart.sh
zedach Feb 12, 2026
88d61c6
fix broken pipe errors caused by set -euo pipefail
zedach Feb 19, 2026
f909f7b
add stale cluster cleanup and fix Agent/Gizmo image tag mismatch
zedach Feb 19, 2026
d6f0a64
add Gizmo SQL port-forwards 11900-11909 for Arrow Flight SQL access
zedach Feb 19, 2026
7ebe313
update gitignore with IDE and Claude Code local files
zedach Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ logs
pgdata
projects
.env
.idea
*.iml

# macOS
.DS_Store
**/.DS_Store

# Claude Code - Local only (don't track)
*.local.md
.claude/settings.local.json
.claude/scripts/
.vscode
**/**/CLAUDE.md
tpch001
16 changes: 12 additions & 4 deletions Dockerfile_airflow
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ USER airflow
# Install aws cli
RUN pip install --no-cache-dir -U awscli

# Configure aws cli
RUN mkdir -p /home/airflow/.aws
COPY conf/aws/credentials /home/airflow/.aws/credentials
COPY conf/aws/config /home/airflow/.aws/config
# NOTE: AWS credentials should NOT be baked into the image.
# For Kubernetes: Use IRSA (EKS), Workload Identity (GKE), or mount credentials via K8s Secret.
# For Docker Compose: Mount ~/.aws as a volume or use environment variables.
# Example K8s Secret mount:
# volumes:
# - name: aws-credentials
# secret:
# secretName: aws-credentials
# volumeMounts:
# - name: aws-credentials
# mountPath: /home/airflow/.aws
# readOnly: true

# Install airflow amazon and google providers
RUN pip install --no-cache-dir \
Expand Down
16 changes: 12 additions & 4 deletions Dockerfile_airflow3
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,18 @@ USER airflow
# Install aws cli
RUN pip install --no-cache-dir -U awscli

# Configure aws cli
RUN mkdir -p /home/airflow/.aws
COPY conf/aws/credentials /home/airflow/.aws/credentials
COPY conf/aws/config /home/airflow/.aws/config
# NOTE: AWS credentials should NOT be baked into the image.
# For Kubernetes: Use IRSA (EKS), Workload Identity (GKE), or mount credentials via K8s Secret.
# For Docker Compose: Mount ~/.aws as a volume or use environment variables.
# Example K8s Secret mount:
# volumes:
# - name: aws-credentials
# secret:
# secretName: aws-credentials
# volumeMounts:
# - name: aws-credentials
# mountPath: /home/airflow/.aws
# readOnly: true

# Install airflow amazon, google and fab providers
RUN pip install --no-cache-dir \
Expand Down
102 changes: 102 additions & 0 deletions Dockerfile_airflow_k8s
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Dockerfile for Airflow on Kubernetes with K8s Job execution
# Use this instead of Dockerfile_airflow for Kubernetes deployments
#
# This image creates K8s Jobs for each starlake command, offloading heavy
# processing from the Airflow pod. Requires:
# - ServiceAccount with RBAC permissions to create/manage Jobs
# - Job template ConfigMap mounted at /etc/starlake/job-template.yaml
# - automountServiceAccountToken: true

# Stage 1: Copy Starlake CLI from UI image
FROM starlakeai/starlake-1.5-ui:1.5 AS starlake-cli

# Stage 2: Build Airflow image with Starlake CLI
FROM apache/airflow:2.11.0

# Switch to root user to install additional packages
USER root

# Install NFS client utilities and kubectl for K8s Job creation
# kubectl is downloaded with SHA256 checksum verification for supply chain security
RUN apt-get update \
&& apt-get install -y nfs-common \
mandoc \
less \
curl \
&& KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt) \
&& ARCH=$(dpkg --print-architecture || echo "amd64") \
&& curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" \
&& curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl.sha256" \
&& echo "$(cat kubectl.sha256) kubectl" | sha256sum --check \
&& chmod +x kubectl \
&& mv kubectl /usr/local/bin/kubectl \
&& rm kubectl.sha256 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ADD conf/airflow/webserver_config.py /opt/airflow/webserver_config.py

# Required to mount NFS volumes
RUN echo "airflow ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/airflow

# Copy the actual Starlake CLI (Java) from UI image
COPY --from=starlake-cli /app/starlake /app/starlake

# Install SL CLI wrapper for Kubernetes Job execution
# This wrapper creates K8s Jobs to offload starlake commands from the Airflow pod
# IMPORTANT: We rename the original starlake to starlake-original and replace it with our wrapper
# because Airflow DAGs call /app/starlake/starlake directly (not /usr/local/bin/starlake)
RUN mv /app/starlake/starlake /app/starlake/starlake-original 2>/dev/null || true
COPY scripts/kubernetes/starlake.sh /app/starlake/starlake
RUN chmod +x /app/starlake/starlake \
&& chmod +x /app/starlake/starlake.sh \
&& chmod +x /app/starlake/starlake-original 2>/dev/null || true \
&& ln -sf /app/starlake/starlake /usr/local/bin/starlake \
&& ln -sf /app/starlake/starlake /usr/local/bin/starlake-k8s

# Copy Java runtime from UI image (required for starlake CLI)
COPY --from=starlake-cli /opt/java /opt/java
ENV JAVA_HOME=/opt/java/openjdk
ENV PATH="${JAVA_HOME}/bin:${PATH}"

# Make JAVA_HOME available in all subshells (for Airflow BashOperator/subprocess)
RUN echo "export JAVA_HOME=/opt/java/openjdk" >> /etc/bash.bashrc \
&& echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/bash.bashrc \
&& echo "export JAVA_HOME=/opt/java/openjdk" >> /etc/profile.d/java.sh \
&& echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/profile.d/java.sh \
&& chmod +x /etc/profile.d/java.sh

# Install gcloud sdk
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz \
&& mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& ln -s /usr/local/gcloud/google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud \
&& rm /tmp/google-cloud-sdk.tar.gz

# Switch back to the airflow user
USER airflow

# Install aws cli
RUN pip install --no-cache-dir -U awscli

# NOTE: AWS credentials should NOT be baked into the image.
# For Kubernetes: Use IRSA (EKS), Workload Identity (GKE), or mount credentials via K8s Secret.
# Example K8s Secret mount in Helm values.yaml:
# airflow:
# extraVolumes:
# - name: aws-credentials
# secret:
# secretName: aws-credentials
# extraVolumeMounts:
# - name: aws-credentials
# mountPath: /home/airflow/.aws
# readOnly: true

# Install airflow amazon and google providers
RUN pip install --no-cache-dir \
apache-airflow-providers-amazon \
apache-airflow-providers-google

# Install SL Python libraries for Airflow 2 (no docker package needed in K8s)
# IMPORTANT: Pin starlake-airflow~=0.4 for Airflow 2 compatibility (0.5+ requires Airflow 3)
RUN pip install --no-cache-dir "starlake-airflow>=0.4,<0.5"
3 changes: 2 additions & 1 deletion Dockerfile_dagster
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM debian:11-slim
# Security fix: Debian 12 (bookworm) for latest security patches
FROM debian:12-slim

# Add Docker's official GPG key:
RUN apt update \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile_projects
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine:latest
# Security fix: Pin Alpine version for reproducible builds and security tracking
FROM alpine:3.21

RUN apk add --no-cache --no-progress \
nfs-utils \
Expand Down
47 changes: 2 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Starlake uses Docker Compose **profiles** to manage different configurations (e.
To start the Pragmatic Duck Data Stack with Airflow and Gizmo on local file system, use the following command:

```bash
COMPOSE_PROFILES=airflow,gizmo SL_API_APP_TYPE=ducklake docker compose up --build
COMPOSE_PROFILES=airflow,minio,gizmo SL_API_APP_TYPE=ducklake docker compose up --build
```

or simply
Expand All @@ -100,12 +100,6 @@ or simply
$ ./dags-stack.sh
```

To start the Pragmatic Duck Data Stack with Airflow & Minio and Gizmo, use the following command:

```bash
COMPOSE_PROFILES=airflow,minio,gizmo SL_API_APP_TYPE=ducklake docker compose up --build
```

To start the stack with a specific profile (e.g., `airflow`) and address any Cloud Datawarehouses, use the following commands:

```bash
Expand Down Expand Up @@ -163,48 +157,11 @@ Once up, the services are accessible at the following default URLs:

> If you are affected by this [Docker issue](https://github.com/docker/for-mac/issues/7583), please upgrade your Docker install.

## Mounting external projects

If you have any starlake container projects and want to mount it:

- run `setup_mac_nfs.sh` if you are on mac in order to expose your folder via NFS.
Modify the root folder to share if necessary. By default it is set to /user.
This change is not specific to starlake and may be used in other container.
- comment `- external_projects_data:/external_projects` in the `volumes` section of the starlake-nas container
- uncomment `- starlake-prj-nfs-mount:/external_projects` right below the line above in the docker compose file
- go to the end of the file and comment uncomment the `starlake-prj-nfs-mount:` section as follows:

```
starlake-prj-nfs-mount:
driver: local
driver_opts:
type: nfs
o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
device: ":/path_to_starlake_project_container" # absolute path to folder on your host where projects are located.
```

Starlake container folder should contain the starlake project folder:

```
/path_to_starlake_project_container
|
- my_first_starlake_project
|
- metadata
- ...
|
- my_second_starlake_project
|
- metadata
- ...
```

If you have many container projects, create as many volume as needed.

## Stopping Starlake UI

To stop Starlake UI, run the following command in the same directory

```bash
docker compose down
```
```
5 changes: 4 additions & 1 deletion cloud-data-stack.sh
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
docker compose --profile airflow up --build
#!/usr/bin/env bash
set -euo pipefail

docker compose --profile airflow up --build
5 changes: 4 additions & 1 deletion dags-stack.sh
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
COMPOSE_PROFILES=airflow,gizmo SL_API_APP_TYPE=ducklake docker compose up --build
#!/usr/bin/env bash
set -euo pipefail

COMPOSE_PROFILES=airflow,gizmo SL_API_APP_TYPE=ducklake docker compose up --build
5 changes: 3 additions & 2 deletions docker-compose-dagster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version: '3.8'
services:

starlake-db:
image: postgres:17
# Security fix: Pin PostgreSQL to patch version for security tracking
image: postgres:17.2
restart: on-failure
container_name: starlake-db
ports:
Expand Down Expand Up @@ -172,4 +173,4 @@ services:
- SL_ASK_API_DOCS_PASSWORD=s3cret.Paw

volumes:
pgdata:
pgdata:
5 changes: 3 additions & 2 deletions docker-compose-snowflake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version: '3.8'
services:

starlake-db:
image: postgres:17
# Security fix: Pin PostgreSQL to patch version for security tracking
image: postgres:17.2
restart: on-failure
container_name: starlake-db
ports:
Expand Down Expand Up @@ -137,4 +138,4 @@ services:
- SL_ASK_API_DOCS_PASSWORD=s3cret.Paw

volumes:
pgdata:
pgdata:
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ x-starlake-airflow:
- ${PROJECTS_DATA_PATH:-./projects}:/projects
- ${PROJECTS_DATA_PATH:-./projects}/dags:/opt/airflow/dags
- ${AIRFLOW_LOGS:-./airflow/logs}:/opt/airflow/logs
- /Users/hayssams/.config:/home/airflow/.config

x-starlake-ui-common:
&starlake-ui-common
Expand All @@ -51,7 +50,7 @@ x-starlake-ui-common:
interval: "5s"
retries: 60
ports:
- ${SL_PORT:-80}:9900 # starlake-ui default port
- ${SL_PORT:-80}:9900 # starlake-ui default port
environment:
&starlake-ui-common-env
SL_API_GIZMO_ON_DEMAND_URL: http://starlake-gizmo:10900
Expand Down Expand Up @@ -135,7 +134,8 @@ services:
- airflow3
- dagster
- snowflake
image: postgres:17
# Security fix: Pin PostgreSQL to patch version for security tracking
image: postgres:17.2
restart: on-failure
container_name: starlake-db
ports:
Expand Down Expand Up @@ -409,7 +409,8 @@ services:
minio:
profiles:
- minio
image: "quay.io/minio/minio:latest"
# Security fix: Chainguard MinIO - official quay.io/minio/minio is unmaintained since Oct 2025
image: "cgr.dev/chainguard/minio:latest"
ports:
- "${SL_MINIO_PORT:-9000}:9000"
- "${SL_MINIO_CONSOLE_PORT:-9001}:9001"
Expand Down
36 changes: 36 additions & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Starlake Helm Chart

This directory contains the official Helm chart for deploying the Starlake Data Stack on Kubernetes.

## Documentation

- **[Chart Documentation](starlake/README.md)** - Complete chart documentation (installation, configuration, parameters)
- **[Quick Start Guide](docs/QUICKSTART.md)** - Step-by-step deployment guides
- **[Local Testing](docs/LOCAL_TESTING.md)** - Test locally with K3s/K3d

## Quick Start

```bash
# Automated test script (creates K3s cluster, installs chart, validates)
./test-helm-chart.sh

# Manual installation
helm install starlake ./starlake \
--namespace starlake \
--create-namespace
```

## Directory Structure

```
helm/
├── starlake/ # The Helm chart
│ ├── Chart.yaml # Chart metadata
│ ├── values.yaml # Default configuration
│ ├── templates/ # Kubernetes templates
│ └── README.md # Chart documentation
├── docs/ # Additional documentation
└── test-helm-chart.sh # Automated test script
```

For full documentation, see [starlake/README.md](starlake/README.md).
Loading