helm: bugs following docs for NixOS deployment

85b079105b introduced some bugs that here I'm fixing.

1. Docs missing `csi.` prefix.
2. Chart was using `cis.csiRBDPluginVolumes` instead of `csi.csiCephFSPluginVolume`.
3. Values had to be a scalar value, not a raw string. Otherwise, the operator can't parse it.
4. Link to `/run/booted-system` instead of `/run/current-system`. In the former, the kernel modules will always match the current kernel; in the latter, it could happen that after a new `nixos-rebuild switch`, plugin containers can't find the kernel modules for the booted kernel version.
5. Values included in the `values.yaml` template were plural. These are not supported, they must all be singular.

About that 3rd point, this was the error being logged:

```
2022-11-04 09:54:47.489851 I | op-k8sutil: CSI_RBD_PLUGIN_VOLUME="|\n - name: lib-modules\n hostPath:\n path: /run/current-system/kernel-modules/lib/modules/\n - name: host-nix\n hostPath:\n path: /nix" (configmap)
2022-11-04 09:54:47.489907 W | ceph-csi: failed to parse "|\n - name: lib-modules\n hostPath:\n path: /run/current-system/kernel-modules/lib/modules/\n - name: host-nix\n hostPath:\n path: /nix" for "CSI_RBD_PLUGIN_VOLUME". json: cannot unmarshal string into Go value of type []v1.Volume
2022-11-04 09:54:47.489916 I | op-k8sutil: CSI_RBD_PLUGIN_VOLUME_MOUNT="|\n - name: host-nix\n mountPath: /nix\n readOnly: true" (configmap)
2022-11-04 09:54:47.489937 W | ceph-csi: failed to parse "|\n - name: host-nix\n mountPath: /nix\n readOnly: true" for "CSI_RBD_PLUGIN_VOLUME_MOUNT". json: cannot unmarshal string into Go value of type []v1.VolumeMount
```

@moduon MT-1503

Signed-off-by: Jairo Llopis <yajo.sk8@gmail.com>
(cherry picked from commit e0ad2f9789)
This commit is contained in:
Jairo Llopis authored and Mergify committed 2022-11-04 17:31:48 +00:00
1 parent 24ef3120c1
commit 525d3f2c55
3 files changed
+11 -11

No files matched your search

@@ -116,10 +116,10 @@ They have to be bind-mounted as volumes in the CephFS and RBD plugin pods.
If you install Rook with Helm, uncomment these example settings in `values.yaml`:
- `csiCephFSPluginVolume`
- `csiCephFSPluginVolumeMount`
- `csiRBDPluginVolume`
- `csiRBDPluginVolumeMount`
- `csi.csiCephFSPluginVolume`
- `csi.csiCephFSPluginVolumeMount`
- `csi.csiRBDPluginVolume`
- `csi.csiRBDPluginVolumeMount`
If you deploy without Helm, add those same values to the corresponding environment variables in the operator pod,
or the corresponding keys in its `ConfigMap`: