-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxy-daemonset.yaml
More file actions
76 lines (76 loc) · 1.55 KB
/
proxy-daemonset.yaml
File metadata and controls
76 lines (76 loc) · 1.55 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
apiVersion: v1
kind: Service
metadata:
name: proxy
labels:
app: proxy
spec:
type: LoadBalancer
selector:
app: proxy
ports:
- name: tcp
port: 11211
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: proxy
labels:
app: proxy
spec:
selector:
matchLabels:
app: proxy
template:
metadata:
labels:
app: proxy
spec:
containers:
- name: proxy
image: memcached:alpine
args: ["-o", "proxy_config=routelib,proxy_arg=/etc/config.lua", "-vv"]
ports:
- containerPort: 11211
volumeMounts:
- name: proxy-config
mountPath: /etc/config.lua
subPath: config.lua
resources:
limits:
memory: "128Mi"
requests:
cpu: "50m"
memory: "32Mi"
livenessProbe:
tcpSocket:
port: 11211
readinessProbe:
tcpSocket:
port: 11211
volumes:
- name: proxy-config
configMap:
name: proxy-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: proxy-config
labels:
app: proxy
data:
config.lua: |
pools{
main = {
backends = {
"memcached-0.memcached-headless.cache.svc.cluster.local:11211",
"memcached-1.memcached-headless.cache.svc.cluster.local:11211",
"memcached-2.memcached-headless.cache.svc.cluster.local:11211",
}
}
}
routes{
default = route_direct{ child = "main" }
}