Configuration
There is few configurations which is available in Redis operator which can be used as per use case.

Mode

Mode of the redis setup.
Available Options:-
  • cluster - For cluster mode setup of redis
  • standalone - For standalone setup of redis
1
mode: cluster
Copied!

Size

Size of the redis cluster pods.
Available Options:-
  • A valid integer
1
size: 3
Copied!

Global

In the global section, we define similar configurations across the redis nodes.
1
global:
2
image: opstree/redis:v2.0
3
imagePullPolicy: IfNotPresent
4
password: "[email protected]"
5
resources:
6
requests:
7
cpu: 100m
8
memory: 128Mi
9
limits:
10
cpu: 100m
11
memory: 128Mi
Copied!

Master

Configuration specific to master nodes of Redis
1
master:
2
service:
3
type: ClusterIP
Copied!

Slave

Configuration specific to slave nodes of Redis
1
slave:
2
service:
3
type: ClusterIP
Copied!

Redis Exporter

Redis Exporter Configurations.
1
redisExporter:
2
enabled: true
3
image: quay.io/opstree/redis-exporter:1.0
4
imagePullPolicy: Always
5
resources:
6
requests:
7
cpu: 100m
8
memory: 128Mi
9
limits:
10
cpu: 100m
11
memory: 128Mi
Copied!

Storage

Storage definition for redis nodes
1
storage:
2
volumeClaimTemplate:
3
spec:
4
storageClassName: csi-cephfs-sc
5
accessModes: ["ReadWriteOnce"]
6
resources:
7
requests:
8
storage: 1Gi
9
selector: {}
Copied!

Priority Class

Name of the Kubernetes priority class which you want to associate with redis setup
1
priorityClassName: priority-100
Copied!

Node Selector

Map of the labels which you want to use as nodeSelector.
1
nodeSelector:
2
memory: medium
Copied!

Security Context

Kubernetes security context for redis pods
1
securityContext:
2
runAsUser: 1000
Copied!

Affinity

Node and pod affinity for redis pods
1
affinity:
2
nodeAffinity:
3
requiredDuringSchedulingIgnoredDuringExecution:
4
nodeSelectorTerms:
5
- matchExpressions:
6
- key: disktype
7
operator: In
8
values:
9
- ssd
Copied!
Last modified 1yr ago