summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Arrage <eddie.arrage@huawei.com>2018-04-04 00:28:12 +0000
committerEddie Arrage <eddie.arrage@huawei.com>2018-04-05 23:30:17 +0000
commit66cc1be27b7fbb27c01a726663e42608eb411672 (patch)
treea6574d6dafd597d6e7d8345bc46555e3e5fe31f3
parent47a9670999787709416e3c3cbb1d2e6617c92f13 (diff)
Add existing public redis pod/service
- Use a community yaml for redis in k8s as simple data store - Redis can be used for tracing and also by the snort-ids to store alerts that can be processed by other services - If flannel is used, the redis CLI can be accessed on the host OS with redis-cli -h <flannel ip> - Within the k8s cluster, the redis service can be accessed with DNS using name 'redis' - The same yaml for redis is also included in toplevel manifest for SDC scenario. Included here if intention is to use separately (tracing only) Change-Id: Ibad283a4cc8938fe01f5de6b7743bdb5511be3af Signed-off-by: Eddie Arrage <eddie.arrage@huawei.com>
-rw-r--r--clover/tools/yaml/redis.yaml45
1 files changed, 45 insertions, 0 deletions
diff --git a/clover/tools/yaml/redis.yaml b/clover/tools/yaml/redis.yaml
new file mode 100644
index 0000000..8a05495
--- /dev/null
+++ b/clover/tools/yaml/redis.yaml
@@ -0,0 +1,45 @@
+---
+apiVersion: v1
+kind: Pod
+metadata:
+ labels:
+ name: redis
+ redis-sentinel: "true"
+ role: master
+ name: redis
+spec:
+ containers:
+ - name: redis
+ image: k8s.gcr.io/redis:v1
+ env:
+ - name: MASTER
+ value: "true"
+ ports:
+ - containerPort: 6379
+ resources:
+ limits:
+ cpu: "0.1"
+ volumeMounts:
+ - mountPath: /redis-master-data
+ name: data
+ - name: sentinel
+ image: kubernetes/redis:v1
+ env:
+ - name: SENTINEL
+ value: "true"
+ ports:
+ - containerPort: 26379
+ volumes:
+ - name: data
+ emptyDir: {}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: redis
+spec:
+ ports:
+ - port: 6379
+ selector:
+ name: redis
+---