The filter server's temporary folder is created in the format /tmp/hnc-{username}/{processID}. While this is essential for the filter conversion process, remnant data may remain requiring periodic removal for service operations. In existing service environments, operations staff can manually removed this folder, but in container environments, an automated process is required. This document guides you through the process of periodically removing this temporary folder data using the K8s CronJob format.
※ Please note that to apply the following guide, you must update the TFO helm chart version to 2.5.7 or higher. Refer to the following guide to update
※ You can remove the temporary folder only if you use PVC (Persistent Volume Claim).
Please refer to the Persistent storage for Kubernetes | Amazon Web Services document.
(1) Check the Pod name of FilterServer
Copy the Pod name that contains the name 'filter' from the list displayed when executing the command below.
kubectl get pods -n <NAMESPACE>
NAMESPACE: Enter the namespace.
(2) Check the PVC name through the pod details
kubectl describe pod <FILTER_SERVER_POD_NAME> -n <NAMESPACE>
FILTER_SERVER_POD_NAME: Enter the name verified in (1).
NAMESPACE: Enter the namespace.
Check the ClaimName name inside the Volume from the output of the command above.
(3) Download the attached file (filter-cache-cleanup-cronjob.yaml) and modify the following parts.
.
.
.
metadata:
name: filter-server-cache-cleanup
namespace: <NAMESPACE> # Enter a Namespace
spec:
schedule: "0 2 * * *" # For example run daily at 2AM, revise as needed
.
.
.
volumes:
- name: filter-cache-volume
persistentVolumeClaim:
claimName: <PVC_NAME> # Enter the name of PVC confirmed in (2)
restartPolicy: OnFailure(4) Apply CronJob.
kubectl -n <NAMESPACE> apply -f filter-cache-cleanup-cronjob.yaml
NAMESPACE: Enter the namespace.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article