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
@@ -173,35 +174,42 @@ By default, redis and sentinel will be called with the basic command, giving the
173
174
If necessary, this command can be changed with the `command` option inside redis/sentinel spec. An example can be found in the [custom command example file](example/redisfailover/custom-command.yaml).
174
175
175
176
### Custom Priority Class
177
+
176
178
In order to use a custom Kubernetes [Priority Class](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for Redis and/or Sentinel pods, you can set the `priorityClassName` in the redis/sentinel spec, this attribute has no default and depends on the specific cluster configuration. **Note:** the operator doesn't create the referenced `Priority Class` resource.
177
179
178
180
### Custom Service Account
181
+
179
182
In order to use a custom Kubernetes [Service Account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for Redis and/or Sentinel pods, you can set the `serviceAccountName` in the redis/sentinel spec, if not specified the `default` Service Account will be used. **Note:** the operator doesn't create the referenced `Service Account` resource.
180
183
181
184
### Custom Pod Annotations
185
+
182
186
By default, no pod annotations will be applied to Redis nor Sentinel pods.
183
187
184
188
In order to apply custom pod Annotations, you can provide the `podAnnotations` option inside redis/sentinel spec. An example can be found in the [custom annotations example file](example/redisfailover/custom-annotations.yaml).
189
+
185
190
### Custom Service Annotations
191
+
186
192
By default, no service annotations will be applied to the Redis nor Sentinel services.
187
193
188
194
In order to apply custom service Annotations, you can provide the `serviceAnnotations` option inside redis/sentinel spec. An example can be found in the [custom annotations example file](example/redisfailover/custom-annotations.yaml).
189
195
190
-
### Control of label propagation.
196
+
### Control of label propagation
197
+
191
198
By default the operator will propagate all labels on the CRD down to the resources that it creates. This can be problematic if the
192
199
labels on the CRD are not fully under your own control (for example: being deployed by a gitops operator)
193
-
as a change to a labels value can fail on immutable resources such as PodDisruptionBudgets. To control what labels the operator propagates
194
-
to resource is creates you can modify the labelWhitelist option in the spec.
200
+
as a change to a labels value can fail on immutable resources such as PodDisruptionBudgets. To control what labels the operator propagates
201
+
to resource is creates you can modify the `propagateLabels` option in the spec.
195
202
196
-
By default specifying no whitelist or an empty whitelist will cause all labels to still be copied as not to break backwards compatibility.
203
+
All labels will be propagated unless otherwise specified.
197
204
198
205
Items in the array should be regular expressions, see [here](example/redisfailover/control-label-propagation.yaml) as an example of how they can be used and
199
206
[here](https://github.com/google/re2/wiki/Syntax) for a syntax reference.
200
207
201
-
The whitelist can also be used as a form of blacklist by specifying a regular expression that will not match any label.
208
+
The allowlist can also be used as a form of blocklist by specifying a regular expression that will not match any label.
202
209
203
-
NOTE: The operator will always add the labels it requires for operation to resources. These are the following:
204
-
```
210
+
NOTE: The operator will always add the labels it requires for operation to resources. These are the following:
If the user choose to have extra volumes creates and mounted, he could use the `extraVolumes` and `extraVolumeMounts`, in `spec.redis` of the CRD. This allows users to mount the extra configurations, or secrets to be used. A typical use case for this might be
224
+
216
225
- Secrets that sidecars might use to backup of RDBs
217
226
- Extra users and their secrets and acls that could used the initContainers to create multiple users
218
227
- Extra Configurations that could merge on top the existing configurations
219
228
- To pass failover scripts for addition for additional operations
220
229
221
-
```
230
+
```yaml
222
231
---
223
232
apiVersion: v1
224
233
kind: Secret
@@ -259,14 +268,12 @@ spec:
259
268
readOnly: true
260
269
```
261
270
262
-
263
-
264
271
## Connection to the created Redis Failovers
265
272
266
273
In order to connect to the redis-failover and use it, a [Sentinel-ready](https://redis.io/topics/sentinel-clients) library has to be used. This will connect through the Sentinel service to the Redis node working as a master.
267
274
The connection parameters are the following:
268
275
269
-
```
276
+
```yaml
270
277
url: rfs-<NAME>
271
278
port: 26379
272
279
master-name: mymaster
@@ -276,7 +283,7 @@ master-name: mymaster
276
283
277
284
To enable auth create a secret with a password field:
|host|**required**| The IP of the target Redis address or the ClusterIP of a pre-existing Kubernetes Service targeting Redis pods |[bootstrapping.yaml](example/redisfailover/bootstrapping.yaml)|
305
-
|port|_optional_| The Port that the target Redis address is listening to. Defaults to `6379`. |[bootstrapping-with-port.yaml](example/redisfailover/bootstrapping-with-port.yaml)|
| host | **required** | The IP of the target Redis address or the ClusterIP of a pre-existing Kubernetes Service targeting Redis pods | [bootstrapping.yaml](example/redisfailover/bootstrapping.yaml) |
314
+
| port | _optional_ | The Port that the target Redis address is listening to. Defaults to `6379`. | [bootstrapping-with-port.yaml](example/redisfailover/bootstrapping-with-port.yaml) |
306
315
| allowSentinels | _optional_ | Allow the Operator to also create the specified Sentinel resources and point them to the target Node/Port. By default, the Sentinel resources will **not** be created when bootstrapping. | [bootstrapping-with-sentinels.yaml](example/redisfailover/bootstrapping-with-sentinels.yaml) |
307
316
308
317
#### What is Bootstrapping?
318
+
309
319
When a `bootstrapNode` is provided, the Operator will always set all of the defined Redis instances to replicate from the provided `bootstrapNode` host value.
310
320
This allows for defining a `RedisFailover` that replicates from an existing Redis instance to ease cutover from one instance to another.
311
321
@@ -314,16 +324,19 @@ This allows for defining a `RedisFailover` that replicates from an existing Redi
314
324
Depending on the configuration provided, the Operator will launch the `RedisFailover` in two bootstrapping states: without sentinels and with sentinels.
By default, if the `RedisFailover` resource defines a valid `bootstrapNode`, **only the redis instances will be created**.
318
329
This allows for ease of bootstrapping from an existing `RedisFailover` instance without the Sentinels intermingling with each other.
319
330
320
331
#### Bootstrapping With Sentinels
332
+
321
333
When `allowSentinels` is provided, the Operator will also create the defined Sentinel resources. These sentinels will be configured to point to the provided
322
334
`bootstrapNode`as their monitored master.
323
335
324
336
### Default versions
325
337
326
338
The image versions deployed by the operator can be found on the [defaults file](api/redisfailover/v1/defaults.go).
339
+
327
340
## Cleanup
328
341
329
342
### Operator and CRD
@@ -332,15 +345,15 @@ If you want to delete the operator from your Kubernetes cluster, the operator de
332
345
333
346
Also, the CRD has to be deleted. Deleting CRD automatically wil delete all redis failover custom resources and their managed resources:
0 commit comments