<@U04S8PLJWMT> I have airbyte deploy on Kubernetes...
# ask-ai
f
@kapa.ai I have airbyte deploy on Kubernetes with an airbyte-minio-0 statefullset to handle the S3 part, as I can only deploy it otherwise on OVH and it can't work with your app. The associated PV is increasing a lot, mainly due to files on "/storage/airbyte-storage/job-logging/workspace". How can I ensure that theses logs files are removed every 7 days
k
To ensure that log files in
/storage/airbyte-storage/job-logging/workspace
are automatically removed every 7 days in your Kubernetes Airbyte deployment with MinIO, you should set the
TEMPORAL_HISTORY_RETENTION_IN_DAYS
environment variable to
7
. This variable controls the retention period for job history and associated logs. For a Helm-based deployment, you can add the following to your `values.yaml`:
Copy code
yaml env_vars:   TEMPORAL_HISTORY_RETENTION_IN_DAYS: 7
Or, if you are using the global section:
Copy code
yaml global:   env_vars:     TEMPORAL_HISTORY_RETENTION_IN_DAYS: 7
This will instruct Airbyte to clean up job logs older than 7 days, helping to prevent your MinIO persistent volume from filling up too quickly. The default retention is 30 days, so reducing it to 7 days will make cleanup more aggressive and help manage disk usage better. Note: Some users have reported that, in certain Airbyte versions or Kubernetes setups, this cleanup may not always work as expected. If you find that logs are not being deleted, you may need to manually clean up the MinIO storage as a temporary workaround by deleting files inside
/storage/airbyte-storage/job-logging/workspace
from within the MinIO pod. However, setting the environment variable as described is the intended and supported approach for automated cleanup in recent Airbyte versions [Configure TEMPORAL_HISTORY_RETENTION_IN_DAYS in abctl deployment](https://github.com/airbytehq/airbyte/discussions/46355) [All sync jobs hanging indefinitely](https://github.com/airbytehq/airbyte/issues/55812). If you continue to experience issues with automatic cleanup, please ensure you are running a recent version of Airbyte, as older versions may not support this feature reliably.
f
@kapa.ai what is the schedule of the cleanup job ? In Kubernetes. And my olds logs files will be removed ? Or only the new ones ?
k
A message from kapa.ai
The knowledge sources do not provide explicit details about the exact schedule (frequency) of the cleanup job for log files in Kubernetes deployments of Airbyte. However, it is confirmed that setting the
TEMPORAL_HISTORY_RETENTION_IN_DAYS
environment variable (e.g., to 7) is intended to control the retention period for job history and associated logs, and that Airbyte will attempt to remove logs older than this value [Configuring Airbyte - Data Retention](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#data-retention) [All sync jobs hanging indefinitely](https://github.com/airbytehq/airbyte/issues/55812). Regarding whether old log files will be removed: - The cleanup process is designed to remove logs older than the specified retention period, so both existing (old) and new logs that exceed the age threshold should be deleted automatically, not just logs created after you set the variable [Airbyte log sweeping](https://discuss.airbyte.io/t/2714) [Airbyte Rotation Logs](https://discuss.airbyte.io/t/332). However, some users have reported that in certain Kubernetes deployments, the cleanup may not always work as expected, and manual intervention might be required if logs are not being deleted automatically [Auto delete job history logs after specific period](https://github.com/airbytehq/airbyte/issues/39358). Summary: - The exact schedule (e.g., hourly, daily) of the cleanup job is not documented in the available sources. - Setting
TEMPORAL_HISTORY_RETENTION_IN_DAYS
should remove all logs older than the specified number of days, including existing old logs. - If you notice logs are not being deleted, you may need to check your Airbyte version or consider manual cleanup as a temporary solution.