forked from fission/fission
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fission-logger.yaml
122 lines (119 loc) · 3.04 KB
/
fission-logger.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Sample Kubernetes Service config for external db service.
#
# apiVersion: v1
# kind: Service
# metadata:
# name: influxdb
# namespace: fission
# spec:
# ports:
# - name: "8086"
# port: 8086
# targetPort: 8086
# protocol: TCP
# ---
# apiVersion: v1
# kind: Endpoints
# metadata:
# name: influxdb
# namespace: fission
# subsets:
# - addresses:
# - ip: replace.influxdb.host.here
# ports:
# - name: "8086"
# port: 8086
# protocol: TCP
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: influxdb
namespace: fission
spec:
replicas: 1
template:
metadata:
labels:
svc: influxdb
spec:
containers:
- name: influxdb
image: tutum/influxdb
env:
- name: PRE_CREATE_DB
value: fissionFunctionLog
# Create a random username/password for InfluxDB here, and
# repeat it in the fluentd spec below.
- name: ADMIN_USER
value: ""
- name: INFLUXDB_INIT_PWD
value: ""
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: logger
namespace: fission
spec:
template:
metadata:
labels:
svc: logger
spec:
containers:
- name: logger
image: fission/fission-bundle
imagePullPolicy: IfNotPresent
command: ["/fission-bundle"]
args: ["--logger"]
volumeMounts:
- name: container-log
mountPath: /var/log/containers
readOnly: true
- name: docker-log
mountPath: /var/lib/docker/containers
readOnly: true
- name: fission-log
mountPath: /var/log/fission
readOnly: false
ports:
- containerPort: 1234
hostPort: 1234
protocol: TCP
- name: fluentd
image: fission/fluentd
imagePullPolicy: IfNotPresent
env:
- name: INFLUXDB_ADDRESS
value: influxdb
- name: INFLUXDB_PORT
value: "8086"
- name: INFLUXDB_DBNAME
value: "fissionFunctionLog"
# Username/password for fluentd to push logs to
# influxdb. This should match the influxdb
# username/passowrd defined above.
- name: INFLUXDB_USERNAME
value: ""
- name: INFLUXDB_PASSWD
value: ""
volumeMounts:
- name: container-log
mountPath: /var/log/containers
readOnly: true
- name: docker-log
mountPath: /var/lib/docker/containers
readOnly: true
- name: fission-log
mountPath: /var/log/fission
readOnly: false
volumes:
- name: container-log
hostPath:
path: /var/log/containers
- name: docker-log
hostPath:
path: /var/lib/docker/containers
- name: fission-log
hostPath:
path: /var/log/fission