From 206bf78c56c2a821d43838e4796d4cbd4afd013b Mon Sep 17 00:00:00 2001 From: Adham Kiwan Date: Thu, 19 Nov 2026 14:20:56 +0200 Subject: [PATCH] fix(linstor): run the NFS server wait init container on the platform CSI image The LinstorCluster set no nfsServer.podTemplate, so the linstor-wait-node-online init container of the NFS server DaemonSet ran piraeus-operator's default CSI image. That image follows the operator release, not linstorCSI.image, so a cluster that pulls only from a mirror of the platform images still needed quay.io for it, and a client behaviour change between the two (as with the certificate variables) would reach this container without the platform choosing it. Pin it to linstorCSI.image like the CSI node and controller pods. nfsServer.enabled is set explicitly, because the operator treats an absent nfsServer as enabled. Closes: #5307 Assisted-by: LLM Signed-off-by: Adham Kiwan (cherry picked from commit 323bd8bd33647be7cb72b828b07f18d4237b1bc1) Signed-off-by: Myasnikov Daniil --- .../system/linstor/templates/cluster.yaml | 11 ++++++++ .../system/linstor/tests/linstor_test.yaml | 28 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/packages/system/linstor/templates/cluster.yaml b/packages/system/linstor/templates/cluster.yaml index 6dbf55ea6..aa320d5d8 100644 --- a/packages/system/linstor/templates/cluster.yaml +++ b/packages/system/linstor/templates/cluster.yaml @@ -122,6 +122,17 @@ spec: containers: - name: linstor-csi image: {{ .Values.linstorCSI.image.repository }}:{{ .Values.linstorCSI.image.tag }} + {{- /* The NFS server DaemonSet runs one init container on the CSI image. + Left unset it follows the operator's default image and tag, not + linstorCSI.image. An absent nfsServer means enabled to the operator, + so enabled is stated explicitly to keep that unchanged. */}} + nfsServer: + enabled: true + podTemplate: + spec: + initContainers: + - name: linstor-wait-node-online + image: {{ .Values.linstorCSI.image.repository }}:{{ .Values.linstorCSI.image.tag }} patches: - target: kind: Deployment diff --git a/packages/system/linstor/tests/linstor_test.yaml b/packages/system/linstor/tests/linstor_test.yaml index 1d0441d46..57b5be514 100644 --- a/packages/system/linstor/tests/linstor_test.yaml +++ b/packages/system/linstor/tests/linstor_test.yaml @@ -16,6 +16,34 @@ tests: path: spec.csiController.podTemplate.spec.containers[0].image pattern: '^ghcr\.io/cozystack/cozystack/linstor-csi:[^@]+@sha256:[0-9a-f]{64}$' + - it: pins the NFS server's wait-node-online init container to the cozystack-built CSI image + template: templates/cluster.yaml + documentSelector: + path: kind + value: LinstorCluster + asserts: + - matchRegex: + path: spec.nfsServer.podTemplate.spec.initContainers[?(@.name=="linstor-wait-node-online")].image + pattern: '^ghcr\.io/cozystack/cozystack/linstor-csi:[^@]+@sha256:[0-9a-f]{64}$' + - equal: + path: spec.nfsServer.enabled + value: true + + - it: the NFS server's wait-node-online init container follows linstorCSI.image + template: templates/cluster.yaml + documentSelector: + path: kind + value: LinstorCluster + set: + linstorCSI: + image: + repository: registry.example/linstor-csi + tag: v0.0.0-test + asserts: + - equal: + path: spec.nfsServer.podTemplate.spec.initContainers[?(@.name=="linstor-wait-node-online")].image + value: registry.example/linstor-csi:v0.0.0-test + - it: pins the satellite to the cozystack-built piraeus-server image template: templates/satellites-cozy.yaml documentSelector: