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 <adhamkiwan@outlook.com>
This commit is contained in:
Adham Kiwan authored and Aleksei Sviridkin committed 2026-11-19 14:20:56 +02:00
1 parent 382169be52
commit 323bd8bd33
2 files changed
+39

No files matched your search

@@ -128,6 +128,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
@@ -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: