# Configuration

### Mode

Mode of the redis setup.

Available Options:-

* cluster - For cluster mode setup of redis
* standalone - For standalone setup of redis

```yaml
mode: cluster
```

### Size

Size of the redis cluster pods.

Available Options:-

* A valid integer

```yaml
size: 3
```

### Global

In the global section, we define similar configurations across the redis nodes.

```yaml
  global:
    image: opstree/redis:v2.0
    imagePullPolicy: IfNotPresent
    password: "Opstree@1234"
    resources:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 100m
        memory: 128Mi
```

### Master

Configuration specific to master nodes of Redis

```yaml
  master:
    service:
      type: ClusterIP
```

### Slave

Configuration specific to slave nodes of Redis

```yaml
  slave:
    service:
      type: ClusterIP
```

### Redis Exporter

Redis Exporter Configurations.

```yaml
  redisExporter:
    enabled: true
    image: quay.io/opstree/redis-exporter:1.0
    imagePullPolicy: Always
    resources:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 100m
        memory: 128Mi
```

### Storage

Storage definition for redis nodes

```yaml
  storage:
    volumeClaimTemplate:
      spec:
        storageClassName: csi-cephfs-sc
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi
      selector: {}
```

### Priority Class

Name of the Kubernetes priority class which you want to associate with redis setup

```yaml
priorityClassName: priority-100
```

### Node Selector

Map of the labels which you want to use as nodeSelector.

```yaml
nodeSelector:
  memory: medium
```

### Security Context

Kubernetes security context for redis pods

```yaml
securityContext:
  runAsUser: 1000
```

### Affinity

Node and pod affinity for redis pods

```yaml
affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
      - matchExpressions:
        - key: disktype
          operator: In
          values:
          - ssd
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opstreelabs.in/redis-operator/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
