Port Redis HA from Helm
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Redis
|
||||
|
||||
Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.
|
||||
|
||||
This is a high-availability deployment of Redis. The Redis master is used for bootstrapping and may be deleted once the cluster is stable.
|
||||
@@ -0,0 +1,15 @@
|
||||
.catalog:
|
||||
name: Redis
|
||||
version: 2.8.23-rancher1
|
||||
description: A highly-available in-memory data structure store
|
||||
questions:
|
||||
- variable: "REDIS_REPLICAS"
|
||||
label: "Initial number of Redis nodes"
|
||||
required: true
|
||||
type: "int"
|
||||
default: 3
|
||||
- variable: "SENTINEL_REPLICAS"
|
||||
label: "Initial number of Redis Sentinel nodes"
|
||||
required: true
|
||||
type: "int"
|
||||
default: 3
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
heritage: helm
|
||||
name: redis
|
||||
redis-sentinel: "true"
|
||||
role: master
|
||||
bootstrap: "true"
|
||||
name: redis-master
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: "deis/redis:v0.0.5"
|
||||
env:
|
||||
- name: MASTER
|
||||
value: "true"
|
||||
- name: DEBUG
|
||||
value: "1"
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
limits:
|
||||
cpu: "0.1"
|
||||
volumeMounts:
|
||||
- mountPath: /redis-master-data
|
||||
name: data
|
||||
- name: sentinel
|
||||
image: "deis/redis:v0.0.5"
|
||||
env:
|
||||
- name: SENTINEL
|
||||
value: "true"
|
||||
- name: DEBUG
|
||||
value: "1"
|
||||
ports:
|
||||
- containerPort: 26379
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
heritage: helm
|
||||
spec:
|
||||
replicas: ${REDIS_REPLICAS}
|
||||
selector:
|
||||
name: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis-cluster
|
||||
name: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: "deis/redis:v0.0.5"
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
limits:
|
||||
cpu: "0.1"
|
||||
volumeMounts:
|
||||
- mountPath: /redis-master-data
|
||||
name: data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,26 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: redis-sentinel
|
||||
labels:
|
||||
heritage: helm
|
||||
spec:
|
||||
replicas: ${SENTINEL_REPLICAS}
|
||||
selector:
|
||||
redis-sentinel: "true"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: redis-sentinel
|
||||
redis-sentinel: "true"
|
||||
role: sentinel
|
||||
provider: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: sentinel
|
||||
image: "deis/redis:v0.0.5"
|
||||
env:
|
||||
- name: SENTINEL
|
||||
value: "true"
|
||||
ports:
|
||||
- containerPort: 26379
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
heritage: helm
|
||||
name: sentinel
|
||||
role: service
|
||||
name: redis-sentinel
|
||||
spec:
|
||||
ports:
|
||||
- port: 26379
|
||||
selector:
|
||||
redis-sentinel: "true"
|
||||
Reference in New Issue
Block a user