Files
cozystack/packages
Aleksei Sviridkin 7d64fb7a53 fix(linstor): run the NFS server wait init container on the platform CSI image (#5358)
## What this PR does

Closes #5307

The LinstorCluster in `packages/system/linstor/templates/cluster.yaml`
had no `nfsServer.podTemplate`. The NFS server DaemonSet's
`linstor-wait-node-online` init container therefore ran
piraeus-operator's default `quay.io/piraeusdatastore/piraeus-csi` image,
at the operator's own tag. Every other container on the CSI image is
pinned to `linstorCSI.image`.

Changes:
- Adds `nfsServer.podTemplate`, which pins that init container to `{{
.Values.linstorCSI.image.repository }}:{{ .Values.linstorCSI.image.tag
}}`, the same way `csiNode` pins its `linstor-wait-node-online`.
- Sets `nfsServer.enabled: true` explicitly. In piraeus-operator
v2.12.1, `ComponentSpec.IsEnabled()` is `c == nil || c.Enabled`. An
absent `nfsServer` is enabled today, and the CRD also defaults `enabled`
to `true`. Stating it keeps the DaemonSet deployed exactly as now and
doesn't rely on that default.
- Adds a helm-unittest case in `tests/linstor_test.yaml`, next to the
existing CSI image pins. It checks that the init container's image is
the cozystack-built `linstor-csi` and that `nfsServer.enabled` is
`true`.

I checked the container name against upstream
`pkg/resources/cluster/nfs-server/nfs-server-daemon-set.yaml` at
v2.12.1, the vendored operator version. The operator applies
`podTemplate` as a strategic merge patch keyed on the container name
(see `ComponentPodTemplate("DaemonSet", "linstor-csi-nfs-server",
...)`), so only the image changes.

### How I checked it

- `helm unittest .` in `packages/system/linstor`: 6 suites and 25 tests
pass. With the template change reverted, the new case fails.
- `helm template` renders `nfsServer` with the pinned
`ghcr.io/cozystack/cozystack/linstor-csi:v1.6.0@sha256:…` image.
- I haven't tried it on a running cluster.

### Screenshots

Not a UI change.

### Downstream repositories

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

This only changes one rendered LinstorCluster field in
`packages/system/linstor`. No values keys, images or versions change.

### Release note

```release-note
fix(linstor): the NFS server's linstor-wait-node-online init container now runs the platform-built linstor-csi image instead of the operator's default.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* LINSTOR clusters now enable the NFS server. Its startup check uses the
image repository and tag configured for LINSTOR CSI, including when
those values are overridden.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-23 14:59:53 +03:00
..