You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-10Lines changed: 56 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -74,11 +74,36 @@ For the DockerHub image, one should stick to the default value, which is `/certi
74
74
75
75
## Custom dictionaries
76
76
77
-
To enable WProofreader Server to use your custom dictionaries, follow these steps:
77
+
The Helm chart provides flexible options for managing custom dictionaries in your WProofreader Server deployment. There are several configuration scenarios to accommodate different use cases:
When `dictionaries.enabled` is set to `true` and neither `dictionaries.localPath` nor `dictionaries.existingClaim` storage configuration is provided, Kubernetes will dynamically provision a Persistent Volume based on `dictionaries.storageClass` that has to be defined externally.
84
+
This is the simplest way to manage custom dictionaries in a Kubernetes environment:
85
+
```yaml
86
+
dictionaries:
87
+
enabled: true
88
+
storageClass: "efs-sc"
89
+
```
90
+
91
+
> [!IMPORTANT]
92
+
> Ensure that the specified storageClass supports the required access mode (typically `ReadWriteMany`).
93
+
> Not all volume plugins (CSI drivers) support all access modes — for example, block storage types like AWS EBS support only `ReadWriteOnce`, while shared file systems like Amazon EFS support `ReadWriteMany`.
94
+
>
95
+
> Read your storage provider’s CSI driver documentation to confirm compatibility before relying on dynamic provisioning.
96
+
97
+
**2. hostPath volume (node-local storage)**
98
+
99
+
Use this option if you prefer mounting dictionaries from the local filesystem of a specific node.
100
+
This is useful when you have a single-node cluster or need to share dictionaries across multiple pods running on the same node.
101
+
102
+
To enable WProofreader Server to use your custom dictionaries with Kubernetes `hostPath` storage type, follow these steps:
78
103
1. Upload the files to a directory on the node where the chart will be deployed.
79
104
Ensure this node has `wproofreader.domain-name.com/app` label.
80
105
2. Set `dictionaries.localPath` parameter to the absolute path of this directory.
81
-
3. Optionally, edit `dictionaries.mountPath` value if non-default one was used in `Dockerfile`,
106
+
3. Optionally, edit `dictionaries.mountPath` value if a non-default one was used in `Dockerfile`,
82
107
as well as other `dictionaries` parameters if needed.
83
108
4. Install the chart as usual.
84
109
@@ -87,27 +112,35 @@ This allows the user to specify which node will host WProofreader Server
87
112
on a cluster, even a single-node one.
88
113
89
114
To assign this role to a node, you need to attach a label to it. It can be any label you choose,
For testing and development purposes, if neither `dictionaries.localPath` nor `dictionaries.existingClaim` is set when `dictionaries.enabled` is `true`, the Helm Chart will automatically create an `emptyDir` volume for dictionaries. This ensures that the deployment can proceed without requiring a predefined storage location.
133
+
134
+
To install the Chart with the custom dictionaries feature enabled and the local path set to the directory on the node where dictionaries are stored:
The dictionary files can be uploaded after the chart installation, but the `dictionaries.localPath`
109
142
folder must exist on the node beforehand.
110
-
Dictionaries can be uploaded to the node VM using standard methods (`scp`, `rsync`, `FTP` etc) or
143
+
Dictionaries can be uploaded to the node VM using standard methods (`scp`, `rsync`, `FTP`, etc.) or
111
144
the `kubectl cp` command. With `kubectl cp`, you need to use one of the deployment's pods.
112
145
Once uploaded, the files will automatically appear on all pods and persist
113
146
even if the pods are restarted. Follow these steps:
@@ -121,7 +154,20 @@ even if the pods are restarted. Follow these steps:
121
154
```
122
155
Replace `/dictionaries` with your custom `dictionaries.mountPath` value if applicable.
123
156
157
+
**3. Existing Persistent Volume Claim (PVC)**
158
+
124
159
There is also a way in the Chart to specify an already existing Persistent Volume Claim (PVC) with dictionaries that can be configured to operate on multiple nodes (e.g., NFS). To do this, enable the custom dictionary feature by setting the `dictionaries.enabled` parameter to `true` and specifying the name of the existing PVC in the `dictionaries.existingClaim` parameter.
160
+
```yaml
161
+
dictionaries:
162
+
enabled: true
163
+
existingClaim: "wproofreader-dictionaries-pvc"
164
+
```
165
+
166
+
**4. Default behavior**
167
+
168
+
If `dictionaries.enabled` is `false`, the chart will use an ephemeral `emptyDir` volume for `/dictionaries`.
169
+
This means any uploaded dictionaries will be lost after pod restarts.
170
+
This setup is only suitable for development and testing.
125
171
126
172
> [!TIP]
127
173
> Using an existing PVC is the recommended way because it ensures that your data will persist even if the Chart is uninstalled. This approach offers a reliable method to maintain data integrity and availability across deployments.
0 commit comments