-
Notifications
You must be signed in to change notification settings - Fork 0
/
redis.yml
134 lines (132 loc) · 2.94 KB
/
redis.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: middleware
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
srv: redis
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
srv: redis
spec:
containers:
- args:
- /usr/local/etc/redis/redis.conf
command:
- redis-server
image: docker.io/library/redis:6.0.9
imagePullPolicy: IfNotPresent
name: redis
resources:
limits:
cpu: 500m
memory: 200Mi
requests:
cpu: 100m
memory: 20Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /usr/local/etc
name: etc
dnsPolicy: ClusterFirst
nodeSelector:
node-role.kubernetes.io/master: "true"
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
items:
- key: redis.conf
path: redis/redis.conf
name: redis-conf
name: etc
---
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: middleware
spec:
ports:
- name: redis-port
nodePort: 36479
port: 6379
protocol: TCP
targetPort: 6379
selector:
srv: redis
type: NodePort
---
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-conf
namespace: middleware
data:
redis.conf: |-
daemonize no
bind 0.0.0.0
pidfile /data/redis.pid
port 6379
tcp-backlog 30000
timeout 0
tcp-keepalive 10
loglevel notice
logfile stdout
databases 16
#save 900 1
#save 300 10
#save 60 10000
stop-writes-on-bgsave-error no
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /data
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
requirepass redis123
maxclients 30000
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events KEA
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 1000
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10