Skip to content

Commit

Permalink
Update README of this change.
Browse files Browse the repository at this point in the history
  • Loading branch information
samof76 committed Aug 31, 2024
1 parent 5179d27 commit c44f4be
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,38 @@ By default, no service annotations will be applied to the Redis nor Sentinel ser

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).

### Disable `mymaster` in Sentinel Cluster Management

By default the sentinel identifies the cluster with `mymaster`, due to the ephemeral nature of Kubernetes. There is a high likelihood of the colliding the sentinel across redisfailover deployments. To avoid this we can set the `disableMyMaster` to `false` under the `sentinel` specification.

```
apiVersion: databases.spotahome.com/v1
kind: RedisFailover
metadata:
name: redisfailover
namespace: disable-mymaster
spec:
sentinel:
replicas: 3
resources:
requests:
cpu: 100m
limits:
memory: 100Mi
disableMyMaster: true
redis:
replicas: 3
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 400m
memory: 500Mi
```

So this will use the name of the redisfailover object and use that instead of `mymaster`. Yes, if you have multiple same redisfailover names across namesapces, you would still run into collision, so please ensure they are not.

### Control of label propagation.
By default the operator will propagate all labels on the CRD down to the resources that it creates. This can be problematic if the
labels on the CRD are not fully under your own control (for example: being deployed by a gitops operator)
Expand Down
1 change: 1 addition & 0 deletions example/redisfailover/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: databases.spotahome.com/v1
kind: RedisFailover
metadata:
name: redisfailover
namespace: basic
spec:
sentinel:
replicas: 3
Expand Down

0 comments on commit c44f4be

Please sign in to comment.