mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
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>
(cherry picked from commit 323bd8bd33)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 parent
a869d0b9d3
commit
206bf78c56
2 files changed
+39
No files matched your search
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user