mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 22:53:43 +09:00
## What this PR does Every deleted ClickHouse or OpenSearch leaves a Completed `<release>-cleanup` Job and its pod in the tenant namespace for good, because the post-delete hooks keep only `before-hook-creation` and have no TTL. The commit adds `ttlSecondsAfterFinished: 86400` to both Jobs, the same value `pre-delete-unpin` in kubernetes-nodes uses, so a succeeded run is reaped and a failed one still keeps its logs for a day. The cleanup tests of both charts gain a case for the TTL; it fails on main and passes here, and the 46 ClickHouse and 153 OpenSearch tests pass. Closes #5542 ### Screenshots Not a UI change. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(clickhouse, opensearch): the post-delete cleanup Job of a deleted ClickHouse or OpenSearch is removed a day after it finishes instead of staying in the tenant namespace for good. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Improvements** * Completed PVC cleanup jobs and their pods are now eligible for automatic removal after one day in ClickHouse and OpenSearch, helping prevent finished cleanup resources from lingering. * Failed cleanup jobs remain available for troubleshooting during that retention period. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd