-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
72 lines (72 loc) · 1.52 KB
/
k8s.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: dnstap
namespace: dnstap
spec:
replicas: 1
selector:
matchLabels:
app: dnstap
template:
metadata:
labels:
app: dnstap
annotations: {}
# prometheus.io/scrape: "true"
# prometheus.io/port: "8080"
# prometheus.io/path: "/metrics"
spec:
containers:
- name: dnstap
image: andrewstuart/dnstap
imagePullPolicy: Always
env:
- name: NOLOG
value: "false"
- name: METRICS_DISABLED
value: "false"
resources:
requests:
cpu: 250m
memory: 200Mi
limits:
cpu: 250m
memory: 200Mi
ports:
- containerPort: 12345
---
apiVersion: v1
kind: Service
metadata:
name: dnstap
namespace: dnstap
spec:
ports:
- port: 12345
targetPort: 12345
selector:
app: dnstap
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: dnstap-pods
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["watch", "get", "list"]
---
# This role binding allows "jane" to read pods in the "default" namespace.
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: dnstap-pods
subjects:
- kind: ServiceAccount
name: default
namespace: dnstap
roleRef:
kind: ClusterRole #this must be Role or ClusterRole
name: dnstap-pods # this must match the name of the Role or ClusterRole you wish to bind to
apiGroup: rbac.authorization.k8s.io