From 40ccc6fca7b93e7af0430d7484d0f01eebc5e8c8 Mon Sep 17 00:00:00 2001 From: eli Date: Tue, 22 Jul 2025 07:47:32 -0700 Subject: [PATCH] opal envs control for logs-forwarder --- charts/pdp/templates/deployment.yaml | 4 ++++ charts/pdp/values.yaml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/charts/pdp/templates/deployment.yaml b/charts/pdp/templates/deployment.yaml index 47ad4802..428c7676 100644 --- a/charts/pdp/templates/deployment.yaml +++ b/charts/pdp/templates/deployment.yaml @@ -47,6 +47,10 @@ spec: value: "true" - name: OPAL_LOG_FILE_PATH value: "/tmp/pdp.log" + - name: OPAL_LOG_FILE_ROTATION + value: "{{ .Values.pdp.logs_forwarder.rotation | default "250 MB" }}" + - name: OPAL_LOG_FILE_RETENTION + value: "{{ .Values.pdp.logs_forwarder.retention | default "3 days" }}" {{- end }} {{- if .Values.pdp.debug_mode }} - name: PDP_DEBUG diff --git a/charts/pdp/values.yaml b/charts/pdp/values.yaml index d632c2e0..26a24d47 100644 --- a/charts/pdp/values.yaml +++ b/charts/pdp/values.yaml @@ -22,6 +22,9 @@ pdp: enabled: false debug_mode: false type: "stdout" # 'stdout' or 'elasticsearch' + # Log rotation settings (only applies when enabled=true) + rotation: "250 MB" # File size threshold for rotation + retention: "3 days" # How long to keep rotated log files elasticsearch: host: "" cloud_auth: "<{user}:{password}>"