-
Notifications
You must be signed in to change notification settings - Fork 0
/
perfume-redis.yaml
80 lines (78 loc) · 1.68 KB
/
perfume-redis.yaml
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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: perfume-redis
namespace: perfume
spec:
serviceName: "perfume-redis"
replicas: 1
selector:
matchLabels:
app: perfume-redis
template:
metadata:
labels:
app: perfume-redis
spec:
securityContext:
fsGroup: 1000
containers:
- name: perfume-redis
image: redis:latest
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
ports:
- containerPort: 6379
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
volumeMounts:
- name: perfume-redis-pv-claim
mountPath: /data
- name: config
mountPath: /usr/local/etc/redis
readinessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 5
timeoutSeconds: 1
livenessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 15
periodSeconds: 20
volumes:
- name: config
configMap:
name: perfume-redis-config
defaultMode: 493
volumeClaimTemplates:
- metadata:
name: perfume-redis-pv-claim
namespace: perfume
spec:
storageClassName: rook-ceph-block
accessModes: [ "ReadWriteOncePod" ]
resources:
requests:
storage: 5Gi
---
apiVersion: v1
kind: Service
metadata:
name: perfume-redis-svc
namespace: perfume
spec:
type: LoadBalancer
ports:
- port: 6379
targetPort: 6379
selector:
app: perfume-redis