Manage disk space

Manage disk space by managing the duration for which images are kept in the review folder.

When the disk usage is over 80 percent, PEG stops processing new messages. To manage the setting in the review folder, perform the following steps:

Procedure

  1. Add the following block of code to the end of the ~/peg/text_pipeline/values-gpu.yaml file. (Alternatively, if an entry already exists, modify it.)
    
     #Archive Info 
     review_retention_days:  365  
    The value that you include here will be the number of days for which PEG will keep an image in the review folder. Replace the number 365 with the number of days for which you want to retain review images. This will affect only the review images. The original images and the images in the forwarded folder will not be affected.
  2. Push the change to PEG by running the following from any folder:
    source ~/peg/scripts/vars.sh
    kubectl delete cronjob.batch/text-pipeline-masking-masking-cron -n text-pipeline
    kubectl get pods --output=jsonpath={.items..metadata.name} -n text-pipeline -o=name | grep cron | xargs -n1 kubectl delete --grace-period=0 --force -n text-pipeline
    helm upgrade text-pipeline ${text_pipeline_dir} -f ${values_file_t} --namespace text-pipeline --set ocr.name=st-fiq-$new_gen_uuid.$apex_domain --set masking.name=dlp-fiq-$new_gen_uuid.$apex_domain