-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Description
When upgrading the Frappe/ERPNext Docker image via the Helm chart, the application sometimes continues to serve stale frontend assets (JS/CSS) from cache. This leads to UI breakages, mismatched assets, or unexpected behavior even though the new image is running successfully.
This issue is typically resolved manually by clearing caches using bench commands and Redis flush, but there is currently no built-in mechanism in the Helm chart to automate this step after upgrades.
Problem
When the image is upgraded:
- Browser loads old assets
- Redis still contains cached data
- Website cache is not cleared
This leads to mismatches between backend code and frontend assets.
Need to exec into a pod and run:
bench clear-website-cache
bench clear-cache
redis-cli FLUSHDB
Proposed Solution
Add an optional Kubernetes Job (or Helm hook) to the Helm chart that runs automatically after upgrade to clear caches.
Possible approaches:
A post-upgrade Helm hook Job
A manually triggerable Job enabled via values.yaml
Job responsibilities:
Run bench clear-website-cache
Run bench clear-cache
Flush Redis (FLUSHDB or FLUSHALL, configurable)