Skip to content

Commit

Permalink
[DEVOPS-814] Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio Chana committed Aug 24, 2018
1 parent 631dc26 commit 3cabc3b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,28 @@ In order to have persistance, a PersistentVolumeClaim usage is allowed. The full

**IMPORTANT**: By default, the persistent volume claims will be deleted when the Redis Failover is. If this is not the expected usage, a `keepAfterDeletion` flag can be added under the `storage` section of Redis. [An example is given](example/redisfailover/persistant-storage-no-pvc-deletion.yaml).

### Custom configurations
It is possible to configure both Redis and Sentinel. This is done with the `customConfig` option inside their spec. It is a list of configurations and their values.

Example:
```yaml
sentinel:
customConfig:
- "down-after-milliseconds 2000"
- "failover-timeout 3000"
redis:
customConfig:
- "maxclients 100"
- "hz 50"
```
**Important*: this options will be set via `config set` or `sentinel set mymaster`. In the Sentinel options, there are some "conversions" to be made.

- Configuration on the `sentinel.conf`: `sentinel down-after-milliseconds mymaster 2000`
- Configuration on the `configOptions`: `down-after-milliseconds 2000`

**Important 2**: do **NOT** change the options used for control the redis/sentinel such as `port`, `bind`, `dir`, etc.

### Connection
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.
The connection parameters are the following:
Expand Down
2 changes: 2 additions & 0 deletions example/redisfailover/all-options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
cpu: 100m
limits:
memory: 100Mi
customConfig: [] # Optional. Empty by default.
redis:
replicas: 3 # Optional. 3 by default, can be set higher.
image: redis # Optional. "redis" by default.
Expand All @@ -27,4 +28,5 @@ spec:
exporterVersion: v0.11.3 # Optional. v0.11.3 by default.
storage:
emptyDir: {} # Optional. emptyDir by default.
customConfig: [] # Optional. Empty by default.

0 comments on commit 3cabc3b

Please sign in to comment.