-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: drivebyer <[email protected]>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
example/v1beta2/redis-cluster-deploy/role-anti-affinity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
# Redis Cluster Custom Resource Definition | ||
# This configuration file defines a Redis Cluster setup with anti-affinity rules | ||
apiVersion: redis.redis.opstreelabs.in/v1beta2 | ||
kind: RedisCluster | ||
metadata: | ||
name: redis-cluster | ||
annotations: | ||
# Enable pod anti-affinity between leader and follower pods | ||
# This ensures leader and follower pods are scheduled on different nodes | ||
# for better high availability | ||
# PS: you should enable operator webhook for this to work | ||
redisclusters.redis.redis.opstreelabs.in/role-anti-affinity: "true" | ||
spec: | ||
clusterSize: 3 | ||
clusterVersion: v7 | ||
persistenceEnabled: true | ||
podSecurityContext: | ||
runAsUser: 1000 | ||
fsGroup: 1000 | ||
kubernetesConfig: | ||
image: quay.io/opstree/redis:v7.0.12 | ||
imagePullPolicy: IfNotPresent | ||
resources: | ||
requests: | ||
cpu: 101m | ||
memory: 128Mi | ||
limits: | ||
cpu: 101m | ||
memory: 128Mi | ||
redisExporter: | ||
enabled: false | ||
image: quay.io/opstree/redis-exporter:v1.44.0 | ||
imagePullPolicy: Always | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
storage: | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: ["ReadWriteOnce"] | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
nodeConfVolume: false | ||
nodeConfVolumeClaimTemplate: | ||
spec: | ||
accessModes: ["ReadWriteOnce"] | ||
resources: | ||
requests: | ||
storage: 1Gi | ||