This repository was archived by the owner on Jun 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathredis-store.Deployment.yaml
More file actions
85 lines (85 loc) · 2.31 KB
/
redis-store.Deployment.yaml
File metadata and controls
85 lines (85 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: Redis for storing semi-persistent data like user sessions.
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: redis
name: redis-store
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: redis-store
strategy:
type: Recreate
template:
metadata:
labels:
deploy: sourcegraph
app: redis-store
spec:
containers:
- name: redis-store
image: index.docker.io/sourcegraph/redis-store:6.3.4167@sha256:7ed009549e7f658e35a8d5bc072d3f49a2711501297f5fddcacd935c782fd007
terminationMessagePolicy: FallbackToLogsOnError
livenessProbe:
initialDelaySeconds: 30
tcpSocket:
port: redis
ports:
- containerPort: 6379
name: redis
readinessProbe:
initialDelaySeconds: 10
timeoutSeconds: 5
exec:
command:
- /bin/sh
- -c
- |
#!/bin/bash
PASS_CHECK=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
if [ ! -z "$PASS_CHECK" ]; then
export REDISCLI_AUTH="$PASS_CHECK"
fi
response=$(
redis-cli ping
)
if [ "$response" != "PONG" ]; then
echo "$response"
exit 1
fi
resources:
limits:
cpu: "1"
memory: 7Gi
requests:
cpu: "1"
memory: 7Gi
volumeMounts:
- mountPath: /redis-data
name: redis-data
- name: redis-exporter
image: index.docker.io/sourcegraph/redis_exporter:6.3.4167@sha256:dbd8dbee20ce84d214150ed6f0ca9afcd238695cf64c4eb8d651a1b24522269c
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 9121
name: redisexp
resources:
limits:
cpu: 10m
memory: 100Mi
requests:
cpu: 10m
memory: 100Mi
securityContext:
runAsUser: 0
volumes:
- name: redis-data
persistentVolumeClaim:
claimName: redis-store