forked from cloudwatt/kube2consul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-deployment.yml
66 lines (63 loc) · 1.45 KB
/
k8s-deployment.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
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: endpointWatcher
rules:
- apiGroups: [""]
resources:
- endpoints
- services
verbs: ["get", "list", "watch"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube2consul
namespace: administration
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kube2consul
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: endpointWatcher
subjects:
- kind: ServiceAccount
name: kube2consul
namespace: administration
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube2consul-worker
labels:
run: kube2consul
namespace: administration
spec:
selector:
matchLabels:
run: kube2consul
replicas: 3
template:
metadata:
labels:
run: kube2consul
spec:
serviceAccountName: kube2consul
containers:
- name: kube2consul
image: echaouchna/kube2consul:latest
command: ["kube2consul", "--lock", "--consul-api", "svc-consul.administration.svc.cluster.local:8500", "-explicit", "-resync-period", "5", "-exclude-namespace", "kube-system", "-exclude-namespace", "kube-public"]
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 15
env:
- name: K2C_LOGTOSTDERR
value: "true"