将 PEG 更改为转发模式,然后再改回审查模式。

先决条件

默认情况下,PEG 最初以审查模式启动。

过程

  1. 要切换到转发模式:
    1. 编辑 ~/peg/text_pipeline/values-gpu.yaml 文件。 在文件末尾,将 forward_to_fluentd 的值更改为 true 并保存更改。
      forward_to_fluentd: "true"
    2. 将更改推送到 PEG,方法是在任意文件夹中运行以下命令:
      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
  2. 要切换回审查模式:
    1. 编辑 ~/peg/text_pipeline/values-gpu.yaml 文件。 在文件末尾,将 forward_to_fluentd 值更改为 false 并保存更改。
      forward_to_fluentd: "false"
    2. 将更改推送到 PEG,方法是在任意文件夹中运行以下命令:
      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