Iceberg tables in order,
with maintenance scheduled in the cluster.
Four common scenarios, from the first installation to your own catalog. Each one covers: what the chart already provides, what changes in the cluster, the values file commented line by line, and a step-by-step with verification.
The tdp-iceberg chart schedules maintenance of Apache Iceberg tables in a Hive Metastore catalog as CronJobs: expire old snapshots, delete orphan files and, if enabled, compact small files. Each execution runs Spark in its own pod, with Iceberg, S3 and Hive Metastore jars already in the image, without a Spark cluster or downloading anything. For the table format, see Apache Iceberg - Concepts.
Your environment
If you fill in your environment details here, the examples and commands on this page use what you entered. The namespace, the release name, and the values file are your choices, not the chart's.
Scenarios
- 1 · First contact
- 2 · Jobs, schedules and tables
- 3 · Resources, image and registry
- 4 · Point to your catalog
Install with chart defaults and run a job immediately, without waiting for the schedule.
This tab installs the chart with the defaults and runs a job immediately, to see the result without waiting for the schedule.
You already have Iceberg tables in Hive Metastore, with data in Ozone, and want maintenance to happen automatically. The chart creates no cluster or service: it schedules CronJobs, and each execution starts a pod that runs Spark, reads the catalog and calls Iceberg maintenance on each table. With defaults, jobs expect Hive Metastore and Ozone in namespace tdp with default release names. If this is not your setup, see scenario 4 first.
expire-snapshots, daily, and remove-orphan-files, weekly, enabled. rewrite-data-files, compaction, disabled.
All Iceberg tables in the maintenance.catalog catalog while each job's tables list is empty.
Hive Metastore and the Ozone S3 Gateway in namespace tdp, with default release names, and the warehouse at s3a://warehouse/hive.
The TDP license in the cluster and, in the release namespace, the tdp-registry pull Secret and s3-credentials Secret containing S3 keys. The chart creates neither.
Spark 4.0.2 with Iceberg 1.10.1 (Spark runtime) and Scala 2.13. The subchart Spark cluster remains disabled and jobs do not use it.
What the chart creates and what each run talks to
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint) - Manual execution. kubectl create job --from=cronjob creates a Job from the CronJob immediately, without waiting for the schedule.
Check the TDP license
The chart requires a valid TDP license installed in the cluster.
kubectl get platformlicenses -A
Success criteria
tdp-license chart, as in Licensing Configuration, before continuing.Create the registry pull Secret
The jobs' image comes from the private Tecnisys registry.
kubectl -n <NAMESPACE> create secret docker-registry tdp-registry \
--docker-server=registry.tecnisys.com.br \
--docker-username=<REGISTRY_USERNAME> --docker-password=<REGISTRY_CLI_SECRET>
The Secret must be in the release namespace before installation. If the namespace does not exist yet, create it first with kubectl create namespace <NAMESPACE>. Credentials and precautions are in Prerequisites.
Create the Secret containing S3 keys
Jobs read the access key and secret key from a Secret in the release namespace.
kubectl -n <NAMESPACE> create secret generic s3-credentials \
--from-literal=access-key='<S3_ACCESS_KEY>' \
--from-literal=secret-key='<S3_SECRET_KEY>'
Without Ozone Kerberos, the default, the S3 Gateway accepts any nonempty key pair. With Kerberos enabled, Ozone issues the ozone-s3-credentials Secret, and jobs read from it: see Security - Iceberg.
Install with defaults
Without a values file, the chart starts exactly as in the figure above.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-iceberg \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace
Without --version, Helm installs the chart's latest published version. With it, the version for this documentation.
Success criteria
kubectl -n <NAMESPACE> get cronjobs
The expire-snapshots and remove-orphan-files CronJobs appear, with the release prefix. At the end of installation, Helm also shows each enabled job's schedule and the catalog and S3 addresses jobs will use.
Run a job now
A Job created from the CronJob executes immediately, without waiting for the schedule.
kubectl -n <NAMESPACE> create job --from=cronjob/<RELEASE_NAME>-tdp-iceberg-expire-snapshots <RELEASE_NAME>-tdp-iceberg-expire-snapshots-manual
kubectl -n <NAMESPACE> logs -f job/<RELEASE_NAME>-tdp-iceberg-expire-snapshots-manual
CronJob names derive from the release: <RELEASE_NAME>-tdp-iceberg- followed by expire-snapshots, remove-orphan-files or rewrite-data-files. When the release name already contains tdp-iceberg, only the release name followed by the job name. With the release iceberg, the CronJob is iceberg-tdp-iceberg-expire-snapshots. With the release named tdp-iceberg, it is tdp-iceberg-expire-snapshots.
Success criteria
tables done). In a catalog without Iceberg tables, the job logs no Iceberg tables found in catalog and finishes without doing anything.If the pod does not start or the job fails
Namespace events, in chronological order, show the reason:
kubectl -n <NAMESPACE> get pods -l component=maintenance
kubectl -n <NAMESPACE> get events --sort-by=.lastTimestamp
Then look up the message in When something goes wrong.
Decide what each job does, when it runs and on which tables, and enable compaction.
This tab decides, for each of the three maintenance jobs, whether it runs, when it runs, and on which tables. The chart already schedules two of them, the one that expires snapshots and the one that removes orphan files, over all the tables in the catalog. The one that rewrites data files comes disabled.
With use, Iceberg tables accumulate old snapshots, files no snapshot references and small data files. Each job addresses one of these problems, and you decide three things for each: whether it runs, when it runs (a cron expression in schedule), and which tables it processes. Each job's tables list accepts names in namespace.tabela format. When empty, the job processes every Iceberg table in the catalog. All three share the same values file format under maintenance.jobs.
expire-snapshotsEnabled, daily. Expires snapshots older than retentionDays, always retaining each table's latest retainLast snapshots.
remove-orphan-filesEnabled, weekly on Sundays. Only deletes files older than olderThanDays.
rewrite-data-filesDisabled because it uses more resources. When enabled, runs weekly on Saturdays with the options in options.
The table maintenance jobs
Which job to adjust
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
Which job to adjust: expire-snapshots
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
Which job to adjust: remove-orphan-files
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
Which job to adjust: rewrite-data-files
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
expire-snapshots. Every write to an Iceberg table creates a snapshot, and old snapshots keep taking up space. This job expires snapshots older than retentionDays and deletes files referenced only by them. Each table's latest retainLast snapshots are always retained, even when old.
1maintenance:2jobs:3 expireSnapshots:4 enabled: true5 schedule: "0 2 * * *"6 retentionDays: 77 retainLast: 18 tables: []
This chart's keys belong at the values file root, without the chart prefix.
- File root (linha 1). This chart's keys belong at the values file root, without the chart prefix.
- Schedule (linha 5). expire-snapshots cron expression. The chart default is in Parameters.
- retentionDays (linha 6). Snapshots older than this number of days expire.
- retainLast (linha 7). How many of each table's latest snapshots are always retained, even when older than retentionDays.
- Tables (linha 8). List in namespace.tabela format. When empty, the job processes every Iceberg table in the catalog.
remove-orphan-files. Files in the table directory that no snapshot references occupy space without serving any query. This job deletes them, but only those older than olderThanDays: keep this value longer than your longest write job, or files from an ongoing commit may be deleted. Iceberg rejects an interval below the minimum in the parameter table.
1maintenance:2jobs:3 removeOrphanFiles:4 enabled: true5 schedule: "0 3 * * 0"6 olderThanDays: 37 tables: []
remove-orphan-files cron expression. The chart default is in Parameters.
- Schedule (linha 5). remove-orphan-files cron expression. The chart default is in Parameters.
- olderThanDays (linha 6). Minimum age, in days, of deleted files. Minimum 1. Keep longer than your longest write job.
- Tables (linha 7). List in namespace.tabela format. Empty means every Iceberg table in the catalog.
rewrite-data-files. Many small data files slow reads. This job compacts them into larger files. It uses more resources than the other two, so it is disabled by default. The example enables nightly compaction for selected tables.
1maintenance:2jobs:3 rewriteDataFiles:4 enabled: true5 schedule: "0 1 * * *"6 tables:7 - sales.orders8 - sales.customers
The chart default is disabled.
- Enabled (linha 4). The chart default is disabled.
- Schedule (linha 5). Every night. The chart default, when enabled, is weekly on Saturdays.
- Tables (linha 6). Only these tables, in namespace.tabela format. Without the list, the job would compact every Iceberg table in the catalog.
Options for Iceberg's rewrite_data_files procedure go in options as key-value pairs:
1maintenance:2jobs:3 rewriteDataFiles:4 options:5 min-input-files: "5"
A rewrite_data_files option with a quoted value. The chart default is no options.
- Iceberg option (linha 5). A rewrite_data_files option with a quoted value. The chart default is no options.
Write the values file
Only settings differing from defaults go in the file. The rest continue coming from the chart.
Combine the blocks for jobs you will adjust in a single file, under the same maintenance.jobs key.
Apply to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-iceberg \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Success criteria
kubectl -n <NAMESPACE> get cronjobs
The SCHEDULE column shows the new schedule, and an enabled job appears in the list. To see the effect without waiting for the schedule, run the job immediately, as in the final step of scenario 1.
Adjust job pod CPU and memory, image and pull Secrets.
This tab adjusts the pod the jobs run in: the CPU and memory it receives, the image, and the registry it comes from. Each execution runs Spark in its own pod, and all three jobs use the same pod size and image. The size comes with a chart default and does not change on its own: when maintenance needs more, you are the one who adjusts it.
You want to give these pods more CPU and memory, use an image from another registry or add a pull Secret just for them. The jobs' image is independent of the optional subchart Spark cluster image: changing one does not change the other.
CPU and memory requests and limits in maintenance.spark.resources, shared by all three jobs (values in All parameters).
The TDP Spark image, in maintenance.spark.image.repository and maintenance.spark.image.tag, with Iceberg, S3 and Hive Metastore jars.
tdp-registry in global.imagePullSecrets, added to maintenance.spark.imagePullSecrets, which defaults to empty.
The job pod: resources, image and registry
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
1maintenance:2spark:3 resources:4 requests:5 cpu: 16 memory: 2Gi7 limits:8 cpu: 29 memory: 4Gi
All three jobs use these resources. There is no per-job block.
- One size for all three (linha 3). All three jobs use these resources. There is no per-job block.
- requests (linha 4). What Kubernetes reserves for each execution's pod.
- limits (linha 7). The pod's upper limit.
1maintenance:2spark:3 image:4 repository: "registry.tecnisys.com.br/tdp/images/spark"5 tag: "4.0.2-3"6 pullPolicy: IfNotPresent7 imagePullSecrets:8 - <SECRET_NAME>
repository contains the image host, project and name in a single string. The values shown are chart defaults.
- Full reference (linha 4). repository contains the image host, project and name in a single string. The values shown are chart defaults.
- Tag and jars (linha 5). Jar paths in spark.driver.extraClassPath and spark.executor.extraClassPath, within maintenance.spark.config, follow this tag: update both when changing it.
- Extra pull Secret (linha 7). Only for job pods. Added to tdp-registry from global.imagePullSecrets, without replacing it. Accepts names or name maps.
The subchart Spark cluster
The chart can also deploy a standalone Spark cluster with master and workers through the spark subchart. It defaults to disabled (spark.enabled: false) and jobs do not use it. Enable it only if you want a Spark cluster from this chart. For a shared cluster, use the tdp-spark chart. The subchart image is in spark.image, and the tdp-registry Secret in global.imagePullSecrets also applies to its pods.
spark.image.repository contains the full image reference: host, project and name. spark.image.registry is an optional prefix for a local mirror. When empty, it adds nothing. To change the image, override spark.image.repository with the full string and leave spark.image.registry empty.
spark:
enabled: false
image:
registry: ""
repository: registry.tecnisys.com.br/tdp/images/spark
tag: 4.0.2-3
pullPolicy: IfNotPresent
Apply to the release
Pods for subsequent executions start with the new values.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-iceberg \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Run a job and inspect the pod
A manual execution shows the new image and resources without waiting for the schedule.
Run a job immediately, as in the last step of scenario 1, and follow the pod:
kubectl -n <NAMESPACE> get pods -l component=maintenance
Success criteria
Running and finishes as Completed.If the pod remains in ImagePullBackOff
The pull Secret is not in the release namespace, or cannot access the new image's registry. See When something goes wrong.
Hive Metastore and Ozone in another namespace or with another release name.
This tab points the jobs to the Hive Metastore and Ozone of your cluster. Chart defaults assume both in namespace tdp, installed with default release names. In your cluster they are in another namespace, or with another release name, and jobs need to know where. Everything jobs use to reach the catalog and files comes from maintenance.spark.config, which the chart writes to each job's spark-defaults.conf. Keys you define are merged with defaults: write only the two addresses, and the rest of the configuration still applies.
spark.sql.catalog.iceberg.uri: the tdp-hive-metastore chart Service in namespace tdp.
spark.sql.catalog.iceberg.warehouse: s3a://warehouse/hive.
spark.hadoop.fs.s3a.endpoint: the tdp-ozone chart S3 Gateway in namespace tdp.
The path to your Hive Metastore and your Ozone
Where Hive Metastore and Ozone are
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
Where Hive Metastore and Ozone are: In namespace tdp (default)
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
Where Hive Metastore and Ozone are: In another namespace
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
Where Hive Metastore and Ozone are: With another release name
- CronJob expire-snapshots. Expires snapshots older than retentionDays, always keeping each table's latest retainLast snapshots, and deletes files referenced only by expired snapshots. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-expire-snapshots, or the release name followed by -expire-snapshots when it already contains tdp-iceberg. Chart default:
enabled, daily · schedule in schedule. (maintenance.jobs.expireSnapshots) - CronJob remove-orphan-files. Deletes files in the table directory not referenced by any snapshot, provided they are older than olderThanDays. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-remove-orphan-files, or the release name followed by -remove-orphan-files when it already contains tdp-iceberg. Chart default:
enabled, weekly on Sundays · schedule in schedule. (maintenance.jobs.removeOrphanFiles) - CronJob rewrite-data-files. Compacts small data files. Uses more resources, so it is disabled by default. A new execution does not start while the previous execution of the same job is still running. The name is <RELEASE_NAME>-tdp-iceberg-rewrite-data-files, or the release name followed by -rewrite-data-files when it already contains tdp-iceberg. Chart default:
disabled · weekly on Saturdays when enabled. (maintenance.jobs.rewriteDataFiles.enabled) - Job pod. Each execution starts a pod running Spark inside itself, without a Spark cluster. Processes the tables listed in tables or, with an empty list, every Iceberg table in the catalog, logs one line per table and finishes with a failure if any table fails. Chart default:
TDP Spark image, with Iceberg, S3 and Hive Metastore jars. (maintenance.spark.image · maintenance.spark.resources) - S3 keys Secret. The pod reads the S3 access key and secret key from it. Create it in the release namespace before the first execution. Chart default:
s3-credentials, keys access-key and secret-key. (maintenance.spark.s3Credentials) - Maintenance ConfigMap. Stores spark-defaults.conf, generated from maintenance.spark.config, and the script jobs execute. Mounted in each pod. Name: <RELEASE_NAME>-tdp-iceberg-maintenance. Chart default:
iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp. (maintenance.spark.config) - Pull Secret. The registry credential the cluster uses to download the jobs' image. Must exist in the release namespace before installation; the chart does not create it. Chart default:
tdp-registry. (global.imagePullSecrets · maintenance.spark.imagePullSecrets) - Jobs ServiceAccount. Job pod identity, created by the chart with a Role and RoleBinding without rules: jobs do not call the Kubernetes API. Chart default:
iceberg-maintenance. (serviceAccount · rbac) - Subchart Spark cluster. Optional standalone Spark cluster, with master and workers. Jobs do not use it; for a shared Spark cluster, use the chart tdp-spark. Chart default:
disabled. (spark.enabled) - Hive Metastore. Stores the Iceberg table catalog. The pod reaches it through the Thrift address in spark.sql.catalog.iceberg.uri. Chart default:
chart tdp-hive-metastore in namespace tdp, with the default release name. (maintenance.spark.config → spark.sql.catalog.iceberg.uri) - S3 storage. Where table files are stored, in the warehouse from spark.sql.catalog.iceberg.warehouse. The pod connects through S3A, at the spark.hadoop.fs.s3a.endpoint endpoint. Chart default:
chart tdp-ozone in namespace tdp, with the default release name; warehouse s3a://warehouse/hive. (maintenance.spark.config → spark.hadoop.fs.s3a.endpoint)
In namespace tdp, with the default release names. Nothing to configure: the chart defaults already point to this Hive Metastore and this Ozone. In namespace tdp: Best suited when Hive Metastore and Ozone were installed in namespace tdp with the default release names. Install as in scenario 1.
In another namespace. The two addresses change only the namespace. The Service names stay the defaults. In another namespace: Best suited when Hive Metastore and Ozone were installed with the default release names, but outside namespace tdp.
1maintenance:2spark:3 config:4 "spark.sql.catalog.iceberg.uri": "thrift://tdp-hive-metastore-metastore.<SHARED_NAMESPACE>.svc.cluster.local:9083"5 "spark.hadoop.fs.s3a.endpoint": "http://tdp-ozone-s3g-rest.<SHARED_NAMESPACE>.svc.cluster.local:9878"
Only keys written here change. Other default maintenance.spark.config properties still apply.
- Merged with defaults (linha 3). Only keys written here change. Other default maintenance.spark.config properties still apply.
- iceberg catalog (linha 4). The Thrift address of the Hive Metastore storing tables. The name iceberg in the key comes from maintenance.catalog: both must match.
- S3 endpoint (linha 5). The Ozone S3 Gateway containing the tables' warehouse.
Apply to the release
The jobs ConfigMap is rewritten with the new addresses.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-iceberg \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Success criteria
helm get notes <RELEASE_NAME> -n <NAMESPACE>
Catalog URI, Warehouse and S3 endpoint show your environment's addresses. Run a job immediately, as in scenario 1: the log now includes your tables.
With another release name. Each Service name derives from the release name, so the two addresses change the name and, if applicable, the namespace. With another release name: Best suited when the Hive Metastore or Ozone releases received other names at installation.
1maintenance:2spark:3 config:4 "spark.sql.catalog.iceberg.uri": "thrift://<HIVE_METASTORE_RELEASE>-metastore.<SHARED_NAMESPACE>.svc.cluster.local:9083"5 "spark.hadoop.fs.s3a.endpoint": "http://<OZONE_RELEASE>-s3g-rest.<SHARED_NAMESPACE>.svc.cluster.local:9878"
Only keys written here change. Other default maintenance.spark.config properties still apply.
- Merged with defaults (linha 3). Only keys written here change. Other default maintenance.spark.config properties still apply.
- Hive Metastore Service (linha 4). Named <release>-metastore: the Hive Metastore release name, plus the suffix. If it is in namespace tdp, put tdp in place of the namespace.
- S3 Gateway Service (linha 5). Named <release>-s3g-rest: the Ozone release name, plus the suffix.
Apply to the release
The jobs ConfigMap is rewritten with the new addresses.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-iceberg \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Success criteria
helm get notes <RELEASE_NAME> -n <NAMESPACE>
Catalog URI, Warehouse and S3 endpoint show your environment's addresses. Run a job immediately, as in scenario 1: the log now includes your tables.
How the chart connects to Hive Metastore and Ozone, their prerequisites, and tables Spark and Trino write in the same catalog are covered in Integrations - Iceberg. S3 keys for Ozone with Kerberos are covered in Security - Iceberg.
When something goes wrong
Troubleshooting
Paste the error message or choose a symptom. The answer includes the cause, what to do and the command.
- Installation rejected by the license. Cause: The TDP license is missing or invalid in the cluster. What to do: Install or renew the TDP license and check with the command below.
- Job pod in ImagePullBackOff. Cause: The tdp-registry Secret does not exist in the release namespace. What to do: Create the pull Secret in the release namespace with your registry credentials (scenario 1).
- Job pod in CreateContainerConfigError. Cause: The Secret specified in maintenance.spark.s3Credentials.secretName does not exist in the release namespace, or lacks the keys specified in accessKeyKey and secretKeyKey. What to do: Create the Secret in the release namespace with the expected keys (scenario 1), or point to yours in Security - Iceberg.
- Job finishes as Failed. Cause: At least one table failed. The job continues with the others and only finishes with a failure at the end. What to do: In the job log, each FAILED line contains the table and error, and the last line lists failed tables.
- no Iceberg tables found in catalog. Cause: The catalog targeted by the jobs has no Iceberg tables: the configured Hive Metastore is not the one containing your tables, or maintenance.catalog does not match spark.sql.catalog.<nome> in maintenance.spark.config. What to do: Check Catalog URI, Warehouse and S3 endpoint in the Helm output at the end of installation (scenario 4).
- remove-orphan-files rejects the interval. Cause: olderThanDays below Iceberg's accepted minimum. What to do: Use olderThanDays at least equal to the minimum in the parameter table and longer than your longest write job.
- Other problem. Cause: Start with job pod status and namespace events. What to do: Events in chronological order show what prevents the pod from starting.
To uninstall, run helm uninstall <RELEASE_NAME> -n <NAMESPACE>. CronJobs are removed with the release. Tables and their data are unchanged.
All parameters
Filter by name or group. This chart's keys belong at the values file root, without a prefix.
35 of 35 parameters
| Parameter | Description | Chart default |
|---|---|---|
maintenance.enabledJobs | Creates maintenance CronJobs | true |
maintenance.catalogJobs | Catalog maintained by jobs (spark.sql.catalog.<nome>) | iceberg |
maintenance.jobs.expireSnapshots.enabledJobs | Enables expire-snapshots | true |
maintenance.jobs.expireSnapshots.scheduleJobs | expire-snapshots schedule (cron) | 0 2 * * * |
maintenance.jobs.expireSnapshots.retentionDaysJobs | Snapshots older than this number of days expire | 7 |
maintenance.jobs.expireSnapshots.retainLastJobs | Latest snapshots always retained in each table | 1 |
maintenance.jobs.removeOrphanFiles.enabledJobs | Enables remove-orphan-files | true |
maintenance.jobs.removeOrphanFiles.scheduleJobs | remove-orphan-files schedule (cron) | 0 3 * * 0 |
maintenance.jobs.removeOrphanFiles.olderThanDaysJobs | Only files older than this number of days are deleted. Minimum 1. Keep longer than your longest write job | 3 |
maintenance.jobs.rewriteDataFiles.enabledJobs | Enables rewrite-data-files (uses more resources) | false |
maintenance.jobs.rewriteDataFiles.scheduleJobs | rewrite-data-files schedule (cron) | 0 1 * * 6 |
maintenance.jobs.rewriteDataFiles.optionsJobs | rewrite_data_files options, for example min-input-files: "5" | {} |
maintenance.jobs.<job>.tablesJobs | namespace.tabela list. Empty = every Iceberg table in the catalog | [] |
maintenance.spark.image.repositoryJob pods | Jobs image, with host, project and name | registry.tecnisys.com.br/tdp/images/spark |
maintenance.spark.image.tagJob pods | Jobs image tag. Classpath jar paths follow the tag | 4.0.2-3 |
maintenance.spark.image.pullPolicyJob pods | Jobs image pull policy | IfNotPresent |
maintenance.spark.imagePullSecretsJob pods | Extra pull Secrets for jobs only, added to global.imagePullSecrets | [] |
maintenance.spark.resources.requests.cpuJob pods | CPU reserved for each job pod | 1 |
maintenance.spark.resources.requests.memoryJob pods | Memory reserved for each job pod | 2Gi |
maintenance.spark.resources.limits.cpuJob pods | CPU limit for each job pod | 2 |
maintenance.spark.resources.limits.memoryJob pods | Memory limit for each job pod | 4Gi |
maintenance.spark.configCatalog and S3 | Spark properties written to the jobs' spark-defaults.conf. Keys you define are merged with defaults | iceberg catalog in Hive Metastore and Ozone S3, in namespace tdp |
maintenance.spark.s3Credentials.secretNameCatalog and S3 | Secret containing S3 keys, in the release namespace | s3-credentials |
maintenance.spark.s3Credentials.accessKeyKeyCatalog and S3 | Secret key containing the access key | access-key |
maintenance.spark.s3Credentials.secretKeyKeyCatalog and S3 | Secret key containing the secret key | secret-key |
global.imagePullSecretsGeneral | Pull Secrets for jobs and the Spark subchart, in the release namespace | [tdp-registry] |
global.compatibility.openshift.adaptSecurityContextGeneral | Security context compatibility with OpenShift | force |
serviceAccount.createGeneral | Creates the jobs' ServiceAccount | true |
serviceAccount.nameGeneral | Jobs ServiceAccount name | iceberg-maintenance |
rbac.createGeneral | Creates the jobs' Role and RoleBinding | true |
rbac.rulesGeneral | Role rules. Jobs do not call the Kubernetes API, only for your extensions | [] |
spark.enabledSpark subchart | Deploys the subchart standalone Spark cluster (jobs do not use it) | false |
spark.image.registrySpark subchart | Optional image prefix for a local mirror. Empty = no prefix | "" |
spark.image.repositorySpark subchart | Full subchart image reference | registry.tecnisys.com.br/tdp/images/spark |
spark.image.tagSpark subchart | Subchart image tag | 4.0.2-3 |
For the complete parameter list, consult the chart's values.yaml or run helm show values for the installed version.
Next steps
Catalog and S3
Integrations - Iceberg
How jobs reach Hive Metastore and Ozone, and Spark and Trino tables.