-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdebug.yml
75 lines (75 loc) · 1.65 KB
/
debug.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
67
68
69
70
71
72
73
74
75
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: debug
spec:
selector:
matchLabels:
app: debug
template:
metadata:
labels:
app: debug
name: debug
spec:
containers:
- name: linux
image: archlinux:latest
imagePullPolicy: Always
workingDir: /mnt/pandit
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- containerPort: 50122
hostPort: 50122
- containerPort: 50121
hostPort: 50121
args:
- ./target/debug/panditd
- -c
- .pandit.docker.yml
- --k8s
# - --level
# - TRACE
securityContext:
privileged: true
runAsGroup: 0
runAsUser: 0
volumeMounts:
- mountPath: /mnt/pandit
name: host
volumes:
- hostPath:
path: /pandit
name: host
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [""]
resources: ["pods", "nodes"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: read-pods
namespace: default
subjects:
- kind: "ServiceAccount"
name: "default"
namespace: "default"
roleRef:
kind: ClusterRole
name: pod-reader
apiGroup: rbac.authorization.k8s.io