-
Notifications
You must be signed in to change notification settings - Fork 4
/
watchpod.yaml
46 lines (46 loc) · 983 Bytes
/
watchpod.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: watchpod
spec:
replicas: 1
selector:
matchLabels:
app: watchpod
template:
metadata:
labels:
app: watchpod
spec:
containers:
- name: watchpod
image: gcr.io/frasaja-1/watchpod:v1
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock-volume
- mountPath: /usr/src/app/test
name: host-mount
volumes:
# attach host's docker socket (how we make api requests to docker daemon)
- name: docker-sock-volume
hostPath:
path: /var/run/docker.sock
type: Socket
# attach host's files that we want to watch
- name: host-mount
hostPath:
path: /mount-9p
type: Directory
---
kind: Service
apiVersion: v1
metadata:
name: watchpod
spec:
type: NodePort
selector:
app: watchpod
ports:
- name: watchpod
port: 8080
targetPort: 8080