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: