diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/deployment.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/deployment.yaml index c4f19a38..cc83273a 100644 --- a/freeleaps/helm-pkg/centralStorage/templates/central-storage/deployment.yaml +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/deployment.yaml @@ -114,5 +114,10 @@ spec: {{- if .Values.logIngest.enabled }} volumes: - name: app-logs + {{- if .Values.logIngest.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-logs-pvc + {{- else }} emptyDir: {} + {{- end }} {{- end }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml index f50ce6d9..152f2bb3 100644 --- a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml @@ -46,7 +46,8 @@ spec: filelog: include: - {{ .Values.logIngest.logPathPattern }} - start_at: beginning + start_at: end + poll_interval: 1s include_file_path: false include_file_name: false operators: @@ -96,8 +97,8 @@ spec: - set(log.body, resource.attributes["body_json"]) - delete_key(resource.attributes, "body_json") batch: - send_batch_size: 5 - timeout: 10s + send_batch_size: 1 + timeout: 1s exporters: otlphttp/logs: endpoint: {{ .Values.logIngest.lokiEndpoint }}/otlp diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/pvc.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/pvc.yaml new file mode 100644 index 00000000..3ac7bee2 --- /dev/null +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/pvc.yaml @@ -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 }} \ No newline at end of file