From b35d6df67c87484973f95f4b85d907b9efc138bc Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 30 Jan 2024 10:56:42 -0500 Subject: [PATCH] feat: add support for displaying error logs --- .../templates/helm-config/ingress-nginx.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/scheduler-k3s/templates/helm-config/ingress-nginx.yaml b/plugins/scheduler-k3s/templates/helm-config/ingress-nginx.yaml index a2a49a659..54eb2a67f 100644 --- a/plugins/scheduler-k3s/templates/helm-config/ingress-nginx.yaml +++ b/plugins/scheduler-k3s/templates/helm-config/ingress-nginx.yaml @@ -5,8 +5,8 @@ controller: # Print access log to file instead of stdout # Separating acces logs from the rest access-log-path: "/data/access.log" + error-log-path: "/data/error.log" log-format-escape-json: "true" - extraVolumeMounts: - name: data mountPath: /data @@ -27,6 +27,20 @@ controller: volumeMounts: - mountPath: /data name: data + extraContainers: + - name: stream-errorlog + image: busybox + args: + - /bin/sh + - -c + - tail -n+1 -F /data/error.log + imagePullPolicy: Always + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /data + name: data allowSnippetAnnotations: true podAnnotations: prometheus.io/path: /metrics