From 01c322525311a2491a7b9941d8dbb94b82ecf9e1 Mon Sep 17 00:00:00 2001 From: Lars Francke Date: Thu, 22 Oct 2026 15:38:27 +0200 Subject: [PATCH 1/2] feat: Write file logs to an emptyDir --- .../templates/csi-node-driver-daemonset.yaml | 8 ++++++++ .../templates/csi-provisioner-deployment.yaml | 8 ++++++++ deploy/helm/listener-operator/values.schema.json | 4 ++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/deploy/helm/listener-operator/templates/csi-node-driver-daemonset.yaml b/deploy/helm/listener-operator/templates/csi-node-driver-daemonset.yaml index 499b1ca8..aca8c146 100644 --- a/deploy/helm/listener-operator/templates/csi-node-driver-daemonset.yaml +++ b/deploy/helm/listener-operator/templates/csi-node-driver-daemonset.yaml @@ -91,6 +91,10 @@ spec: mountPath: /csi - name: mountpoint mountPath: {{ .Values.kubeletDir }}/pods + {{- if .Values.telemetry.fileLog.enabled }} + - name: log + mountPath: {{ include "listener-operator.telemetry.fileLogDirectory" . }} + {{- end }} - name: node-driver-registrar image: "{{ include "listener-operator.csi-node-driver-registrar.image" . }}" imagePullPolicy: {{ .Values.csiNodeDriver.nodeDriverRegistrar.image.pullPolicy }} @@ -116,6 +120,10 @@ spec: - name: mountpoint hostPath: path: {{ .Values.kubeletDir }}/pods/ + {{- if .Values.telemetry.fileLog.enabled }} + - name: log + emptyDir: {} + {{- end }} {{- with .Values.csiNodeDriver.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/deploy/helm/listener-operator/templates/csi-provisioner-deployment.yaml b/deploy/helm/listener-operator/templates/csi-provisioner-deployment.yaml index 693063c6..26454b91 100644 --- a/deploy/helm/listener-operator/templates/csi-provisioner-deployment.yaml +++ b/deploy/helm/listener-operator/templates/csi-provisioner-deployment.yaml @@ -97,6 +97,10 @@ spec: volumeMounts: - name: csi mountPath: /csi + {{- if .Values.telemetry.fileLog.enabled }} + - name: log + mountPath: {{ include "listener-operator.telemetry.fileLogDirectory" . }} + {{- end }} startupProbe: httpGet: path: /ready @@ -120,6 +124,10 @@ spec: volumes: - name: csi emptyDir: {} + {{- if .Values.telemetry.fileLog.enabled }} + - name: log + emptyDir: {} + {{- end }} {{- with .Values.csiProvisioner.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/deploy/helm/listener-operator/values.schema.json b/deploy/helm/listener-operator/values.schema.json index 034da769..43b00026 100644 --- a/deploy/helm/listener-operator/values.schema.json +++ b/deploy/helm/listener-operator/values.schema.json @@ -434,14 +434,14 @@ }, "fileLog": { "title": "File logs", - "description": "Writes logs to /stackable/logs inside the container.", + "description": "Writes logs to /var/log/listener-operator inside the container, on an emptyDir volume.", "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "default": false, - "description": "Whether the operator also writes logs to /stackable/logs inside the container. Off by default: it needs a volume to be useful, otherwise the logs vanish with the pod." + "description": "Whether the operator also writes logs to /var/log/listener-operator inside the container. Off by default. The logs survive container restarts but not the Pod." }, "level": { "title": "File log level", From 91b29196c39c63ba147867c46f7494d399bb842b Mon Sep 17 00:00:00 2001 From: Lars Francke Date: Thu, 22 Oct 2026 15:43:47 +0200 Subject: [PATCH 2/2] chore: Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1c44fa..81b1d55e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file. `serviceAccount.name`; it used to fall back to the namespace default ServiceAccount, which lacks the operator ClusterRole ([#418]). - Install default resources regardless of CRD maintenance flag ([#439]). +- File logging no longer crash-loops the operator when the root filesystem is read-only, as it is on OpenShift. Logs are written to an `emptyDir` at `/var/log/listener-operator` ([#444]). [#411]: https://github.com/stackabletech/listener-operator/pull/411 [#416]: https://github.com/stackabletech/listener-operator/pull/416 @@ -29,6 +30,7 @@ All notable changes to this project will be documented in this file. [#434]: https://github.com/stackabletech/listener-operator/pull/434 [#439]: https://github.com/stackabletech/listener-operator/pull/439 [#441]: https://github.com/stackabletech/listener-operator/pull/441 +[#444]: https://github.com/stackabletech/listener-operator/pull/444 ## [26.7.0] - 2026-07-21