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:39:15 +0000
commit10de001191d3d938898993f24c127d72c72d5b33 (patch)
treeb0d09da66d030db48bf3117100f89d2b31ba806b
parent67b7fb49e6ea6ac9c2547af263355e5f1aeade42 (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> (cherry picked from commit 66cc1be27b7fbb27c01a726663e42608eb411672)
-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
+---