Delta Lake Configuration
What is Delta Lake?
Delta Lake is an open table format that adds ACID transactions to object storage (S3/Ozone). Instead of writing Parquet files directly, Delta Lake maintains a transaction log — a history of all operations (INSERT, UPDATE, DELETE, MERGE) performed on the table.
Over time, this model generates two types of accumulation that require periodic cleanup:
- Orphan files: Parquet files that exist in S3 but are no longer referenced by any active version of the table
- Old versions: the transaction log maintains history indefinitely; without cleanup, it grows without limit
The tdp-deltalake chart is not a continuous application — it creates Kubernetes CronJobs that run periodically to perform this maintenance automatically, using Apache Spark 4.0.2.
See Delta Lake — Concepts for a complete overview of the format, ACID transactions, and use cases.
Maintenance jobs provided
| Job | Description |
|---|---|
| VACUUM | Removes old files not referenced by the transaction log |
| OPTIMIZE | Compacts small files into larger files |
| OPTIMIZE Z-ORDER | Optimizes data layout for queries with specific filters |
| DESCRIBE HISTORY | Records change history for auditing |
Helm Values Structure
The tdp-deltalake chart distributes configuration across two blocks:
maintenance:— maintenance jobs (VACUUM, OPTIMIZE, Z-ORDER, DESCRIBE HISTORY), scheduling (cron), retention, and Spark configuration for the jobs.spark:— upstream Spark chart values: base image, labels, master and worker configuration.
maintenance:
enabled: true
spark:
enabled: true
image:
repository: "registry.tecnisys.com.br/tdp-dev/images/spark"
tag: "4.0.2-0"
jobs:
vacuum:
enabled: true
schedule: "0 2 * * *"
retentionHours: 168
spark:
image:
registry: registry.tecnisys.com.br
repository: tdp-dev/images/spark
tag: 4.0.2-0
Overview
| Property | Value |
|---|---|
| Chart | tdp-deltalake |
| Type | maintenance (CronJobs) |
| Delta Lake version | 4.0.1 |
| Chart version | 3.0.1 |
| Registry (OCI) | oci://registry.tecnisys.com.br/tdp/charts/tdp-deltalake |
| Spark | 4.0.2 |
| Scala | 2.13 |
Related pages
- Integrations — Delta Lake: S3/MinIO, Trino, Spark, Airflow.
- Security — Delta Lake: S3 credentials Secret and best practices.
Prerequisites
- Kubernetes 1.32+, Red Hat OpenShift 4.19+ or Rancher Manager 2.10.x+
- Helm 3.2.0+
- Secret
s3-credentialswith keysaccess-keyandsecret-keycreated in the namespace before deployment. See Security — Delta Lake for instructions.
- Installation
- Main parameters
- Configuration details
- Uninstallation
Installation
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-deltalake \
--version <CHART_VERSION> \
-n <NAMESPACE> --create-namespace
| Placeholder | Description |
|---|---|
<RELEASE_NAME> | Helm release name |
<NAMESPACE> | Kubernetes installation namespace |
<CHART_VERSION> | Chart version |
OpenShift
On OpenShift, the chart applies force to the Security Context by default:
global:
compatibility:
openshift:
adaptSecurityContext: force
This value is pre-configured in values.yaml. The reason for this default is covered on the General Configuration page, in the Environment decisions that affect configuration tab, under Orchestrator compatibility and security adjustments.
Post-installation verification
# List created CronJobs
kubectl get cronjobs -n <NAMESPACE>
# Check latest runs
kubectl get jobs -n <NAMESPACE>
# Logs for a specific job
kubectl logs -n <NAMESPACE> -l job-name=<JOB_NAME>
Main parameters
| Parameter | Description | Default |
|---|---|---|
maintenance.enabled | Enable maintenance jobs | true |
maintenance.spark.enabled | Enable Spark dependency | true |
maintenance.spark.image.repository | Spark image | registry.tecnisys.com.br/tdp-dev/images/spark |
maintenance.spark.image.tag | Spark image tag | 4.0.2-0 |
maintenance.spark.resources.requests.cpu | Min CPU per job | 1 |
maintenance.spark.resources.requests.memory | Min memory per job | 2Gi |
maintenance.spark.resources.limits.cpu | Max CPU per job | 2 |
maintenance.spark.resources.limits.memory | Max memory per job | 4Gi |
maintenance.jobs.vacuum.enabled | Enable VACUUM job | true |
maintenance.jobs.vacuum.schedule | VACUUM cron schedule | 0 2 * * * |
maintenance.jobs.vacuum.retentionHours | VACUUM retention (hours) | 168 |
maintenance.jobs.optimize.enabled | Enable OPTIMIZE job | true |
maintenance.jobs.optimize.schedule | OPTIMIZE cron schedule | 0 3 * * 0 |
maintenance.jobs.optimizeZOrder.enabled | Enable OPTIMIZE Z-ORDER | false |
maintenance.jobs.optimizeZOrder.schedule | OPTIMIZE Z-ORDER cron | 0 1 * * 6 |
maintenance.jobs.describeHistory.enabled | Enable DESCRIBE HISTORY | false |
maintenance.jobs.describeHistory.schedule | DESCRIBE HISTORY cron | 0 6 * * * |
maintenance.defaultTablePath | Default Delta table path in S3 | s3a://warehouse/delta |
Maintenance jobs
Configure jobs in maintenance.jobs:
maintenance:
enabled: true
jobs:
vacuum:
enabled: true
schedule: "0 2 * * *" # Daily at 2 AM
retentionHours: 168 # 7 days (default)
optimize:
enabled: true
schedule: "0 3 * * 0" # Weekly on Sundays at 3 AM
optimizeZOrder:
enabled: false
schedule: "0 1 * * 6" # Saturdays at 1 AM
describeHistory:
enabled: false
schedule: "0 6 * * *" # Daily at 6 AM
Each schedule defines when the cluster performs intensive I/O work against the warehouse. During peak query windows, VACUUM and OPTIMIZE compete with Trino, Spark, and other consumers for bandwidth. Adjust schedules to low-traffic windows.
The retentionHours for VACUUM is tied to the minimum time old versions must remain visible for time travel and long-running reads. Reducing retention without aligning with actual usage may cause read errors or excessive storage costs.
VACUUM
Removes files no longer referenced by the Delta Log:
VACUUM delta.`s3a://warehouse/delta/table` RETAIN 168 HOURS;
The default retention period is 7 days (168 hours). Do not reduce below 7 days in production — this may cause data loss for in-progress queries.
OPTIMIZE
Compacts small files into larger files to improve read performance:
OPTIMIZE delta.`s3a://warehouse/delta/table`;
OPTIMIZE with Z-ORDER
Optimizes data layout for queries with specific filters:
OPTIMIZE delta.`s3a://warehouse/delta/table` ZORDER BY (column1, column2);
Spark configuration
The image and resources define the CPU and memory ceiling each CronJob may use when executing operations on large tables. Symptoms like OOMKilled or very long runs typically require increasing limits. The tag must match Spark 4.0.2 and Delta 4.0.1 as indicated in the compatibility table.
maintenance:
spark:
image:
repository: "registry.tecnisys.com.br/tdp-dev/images/spark"
tag: "4.0.2-0"
resources:
requests:
cpu: 1
memory: 2Gi
limits:
cpu: 2
memory: 4Gi
config:
"spark.hadoop.fs.s3a.endpoint": "http://<S3_ENDPOINT>.<NAMESPACE>.svc.cluster.local:9000"
"spark.hadoop.fs.s3a.path.style.access": "true"
Integrations
This page covers the maintenance CronJobs. The Integrations — Delta Lake page covers storage credentials (S3/MinIO) and how Trino, Spark, and Airflow consume the same Delta tables.
Uninstallation
helm uninstall <RELEASE_NAME> -n <NAMESPACE>
This command removes all release resources (CronJobs, Jobs, ServiceAccount, RBAC). This chart does not create PVCs.