blob: ec980e84109bb22d10d5e1664f45e9e6e6c9a5fd [file] [log] [blame]
Richard Jankowskid7921b72018-02-20 16:55:12 -05001apiVersion: v1
2kind: Service
3metadata:
4 name: consul
5 namespace: voltha
6 labels:
7 name: consul
8spec:
9 type: ClusterIP
10 clusterIP: None
11 ports:
12 - name: http
13 port: 8500
14 targetPort: 8500
15 - name: https
16 port: 8443
17 targetPort: 8443
18 - name: rpc
19 port: 8400
20 targetPort: 8400
21 - name: serflan-tcp
22 protocol: "TCP"
23 port: 8301
24 targetPort: 8301
25 - name: serflan-udp
26 protocol: "UDP"
27 port: 8301
28 targetPort: 8301
29 - name: serfwan-tcp
30 protocol: "TCP"
31 port: 8302
32 targetPort: 8302
33 - name: serfwan-udp
34 protocol: "UDP"
35 port: 8302
36 targetPort: 8302
37 - name: server
38 port: 8300
39 targetPort: 8300
40 - name: consuldns
41 port: 8600
42 targetPort: 8600
43 selector:
44 app: consul
45---
46apiVersion: apps/v1beta1
47kind: StatefulSet
48metadata:
49 name: consul
50 namespace: voltha
51spec:
52 serviceName: consul
53 replicas: 1
54 template:
55 metadata:
56 labels:
57 app: consul
58 annotations:
59 cni: "weave"
60 spec:
61 terminationGracePeriodSeconds: 10
62 containers:
63 - name: consul
64 image: "consul:0.9.2"
65 env:
66 - name: NAMESPACE
67 valueFrom:
68 fieldRef:
69 fieldPath: metadata.namespace
70 args:
71 - "agent"
72 - "-server"
73 - "-bootstrap"
74 - "-config-dir=/consul/config"
75 - "-data-dir=/consul/data"
76 - "-bind=0.0.0.0"
77 - "-client=0.0.0.0"
78 - "-ui"
79 - "-raft-protocol=3"
80 lifecycle:
81 preStop:
82 exec:
83 command:
84 - /bin/sh
85 - -c
86 - consul leave
87 ports:
88 - containerPort: 8500
89 name: ui-port
90 - containerPort: 8400
91 name: alt-port
92 - containerPort: 53
93 name: udp-port
94 - containerPort: 8443
95 name: https-port
96 - containerPort: 8080
97 name: http-port
98 - containerPort: 8301
99 name: serflan
100 - containerPort: 8302
101 name: serfwan
102 - containerPort: 8600
103 name: consuldns
104 - containerPort: 8300
105 name: server
106