forked from coreos/torus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtorus-k8s-oneshot.yaml
118 lines (118 loc) · 2.41 KB
/
torus-k8s-oneshot.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
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
apiVersion: v1
kind: Service
metadata:
labels:
name: etcd-torus
name: etcd-torus
spec:
type: NodePort
ports:
- port: 2379
name: etcd-client
targetPort: etcd-client
nodePort: 32379
selector:
name: etcd-torus
---
apiVersion: v1
kind: Service
metadata:
labels:
name: etcd-torus-internal
name: etcd-torus-internal
spec:
clusterIP: 10.3.0.100
ports:
- port: 2379
name: etcd-client
targetPort: etcd-client
selector:
name: etcd-torus
---
apiVersion: v1
kind: Pod
metadata:
labels:
name: etcd-torus
name: etcd-torus
spec:
containers:
- image: quay.io/coreos/etcd:v3.0.0-beta.0
name: etcd-torus
ports:
- name: etcd-peers
containerPort: 2380
- name: etcd-client
containerPort: 2379
volumeMounts:
- name: data
mountPath: /var/lib/etcd
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: ETCD_DATA_DIR
value: /var/lib/etcd
- name: ETCD_NAME
value: etcd
- name: ETCD_INITIAL_CLUSTER
value: etcd=http://$(POD_IP):2380
- name: ETCD_INITIAL_ADVERTISE_PEER_URLS
value: http://$(POD_IP):2380
- name: ETCD_ADVERTISE_CLIENT_URLS
value: http://$(POD_IP):2379
- name: ETCD_LISTEN_CLIENT_URLS
value: http://0.0.0.0:2379
- name: ETCD_LISTEN_PEER_URLS
value: http://$(POD_IP):2380
volumes:
- name: data
emptyDir: {}
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: torus
labels:
app: torus
spec:
template:
metadata:
name: torus
labels:
daemon: torus
spec:
containers:
- name: torus
image: quay.io/coreos/torus:latest
ports:
- name: peer
containerPort: 40000
- name: http
containerPort: 4321
env:
- name: ETCD_HOST
value: $(ETCD_TORUS_SERVICE_HOST)
- name: STORAGE_SIZE
value: 2GiB
- name: LISTEN_HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: AUTO_JOIN
value: "1"
- name: DEBUG_INIT
value: "1"
- name: DROP_MOUNT_BIN
value: "0"
volumeMounts:
- name: data
mountPath: /data
readOnly: false
volumes:
- name: data
hostPath:
path: /srv/torus
imagePullSecrets:
- name: quay-torus