Merge pull request 'fix: optimize central storage logging configuration to resolve hourly log bursts' (#37) from Nicolas_local_ops into master

Reviewed-on: https://gitea.freeleaps.mathmast.com/freeleaps/freeleaps-ops/pulls/37
This commit is contained in:
Nicolas 2025-07-31 02:16:06 +00:00
commit a2ffc1ea4d
3 changed files with 28 additions and 3 deletions

View File

@ -114,5 +114,10 @@ spec:
{{- if .Values.logIngest.enabled }} {{- if .Values.logIngest.enabled }}
volumes: volumes:
- name: app-logs - name: app-logs
{{- if .Values.logIngest.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Release.Name }}-logs-pvc
{{- else }}
emptyDir: {} emptyDir: {}
{{- end }}
{{- end }} {{- end }}

View File

@ -46,7 +46,8 @@ spec:
filelog: filelog:
include: include:
- {{ .Values.logIngest.logPathPattern }} - {{ .Values.logIngest.logPathPattern }}
start_at: beginning start_at: end
poll_interval: 1s
include_file_path: false include_file_path: false
include_file_name: false include_file_name: false
operators: operators:
@ -96,8 +97,8 @@ spec:
- set(log.body, resource.attributes["body_json"]) - set(log.body, resource.attributes["body_json"])
- delete_key(resource.attributes, "body_json") - delete_key(resource.attributes, "body_json")
batch: batch:
send_batch_size: 5 send_batch_size: 1
timeout: 10s timeout: 1s
exporters: exporters:
otlphttp/logs: otlphttp/logs:
endpoint: {{ .Values.logIngest.lokiEndpoint }}/otlp endpoint: {{ .Values.logIngest.lokiEndpoint }}/otlp

View File

@ -0,0 +1,19 @@
{{- if and .Values.logIngest.enabled .Values.logIngest.persistence.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-logs-pvc
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: "central-storage"
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.logIngest.persistence.size | default "1Gi" }}
{{- if .Values.logIngest.persistence.storageClass }}
storageClassName: {{ .Values.logIngest.persistence.storageClass }}
{{- end }}
{{- end }}