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-cache.Deployment.yaml
More file actions
86 lines (86 loc) · 2.41 KB
/
redis-cache.Deployment.yaml
File metadata and controls
86 lines (86 loc) · 2.41 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
86
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: Redis for storing short-lived caches.
kubectl.kubernetes.io/default-container: redis-cache
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: redis
name: redis-cache
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: redis-cache
strategy:
type: Recreate
template:
metadata:
labels:
deploy: sourcegraph
app: redis-cache
spec:
containers:
- name: redis-cache
image: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/redis-cache:6.0.2687@sha256:724d7ffb2f09a30998cafb38322b94b78d9802df066306fc26c1320830f9e6ea
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: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/redis_exporter:6.0.2687@sha256:ba52bed25e8c7fe03769b6aa0790e636b62f41c7f0ecba62f7275ecb618d8b40
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-cache