Last active
November 24, 2021 08:20
-
-
Save fdeantoni/1c5eb0ee16688173cb45b1e0d7d15bdb to your computer and use it in GitHub Desktop.
Kubernetes ConfigMap for Redis cluster deployment.
This file contains hidden or 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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: redis-cluster | |
| namespace: redis | |
| data: | |
| update-node.sh: | | |
| #!/bin/sh | |
| REDIS_NODES="/data/nodes.conf" | |
| sed -i -e "/myself/ s/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/${POD_IP}/" ${REDIS_NODES} | |
| exec "$@" | |
| redis.conf: |+ | |
| cluster-enabled yes | |
| cluster-require-full-coverage no | |
| cluster-node-timeout 15000 | |
| cluster-config-file /data/nodes.conf | |
| cluster-migration-barrier 1 | |
| appendonly yes | |
| protected-mode no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment