blob: 0e4839b127e3d9b6f7fb5fef07dc523f856a454d [file] [log] [blame]
Richard Jankowskic9d89202018-01-25 10:25:10 -05001#
2# This file describes a cluster of 3 fluentd forwarders that
3# send logs to a cluster of 2 fluentd aggregators: one active
4# and one standby.
5#
6# The active fluentd aggregator
7#
8apiVersion: v1
9kind: Service
10metadata:
11 name: fluentdactv
12spec:
13 clusterIP: None
14 selector:
15 app: fluentdactv
16 ports:
17 - protocol: TCP
18 port: 24224
19 targetPort: 24224
20---
21#
22# Ensure that the active aggregator is not deployed to the
23# same node as the standby
24#
25apiVersion: apps/v1beta1
26kind: Deployment
27metadata:
28 name: fluentdactv
29spec:
30 replicas: 1
31 template:
32 metadata:
33 labels:
34 app: fluentdactv
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -050035 annotations:
36 cni: "weave"
Richard Jankowskic9d89202018-01-25 10:25:10 -050037 spec:
38 terminationGracePeriodSeconds: 10
39 affinity:
40 podAntiAffinity:
41 requiredDuringSchedulingIgnoredDuringExecution:
42 - labelSelector:
43 matchExpressions:
44 - key: app
45 operator: In
46 values:
47 - fluentdstby
48 topologyKey: kubernetes.io/hostname
49 containers:
50 - name: fluentdactv
Richard Jankowskic3c291c2018-02-02 13:57:33 -050051 image: voltha-fluentd
Richard Jankowskic9d89202018-01-25 10:25:10 -050052 imagePullPolicy: Never
53 volumeMounts:
54 - name: fluentd-log
55 mountPath: /fluentd/log
56 ports:
57 - containerPort: 24224
58 env:
59 - name: FLUENTD_CONF
60 value: fluent-agg.conf
61 volumes:
62 - name: fluentd-log
63 hostPath:
64 path: /var/log/voltha/logging_volume
65 type: Directory
66---
67#
68# The standby fluentd aggregator
69#
70apiVersion: v1
71kind: Service
72metadata:
73 name: fluentdstby
74spec:
75 clusterIP: None
76 selector:
77 app: fluentdstby
78 ports:
79 - protocol: TCP
80 port: 24224
81 targetPort: 24224
82---
83#
84# Ensure thet the standby aggregator is not deployed to the
85# same node as the active
86#
87apiVersion: apps/v1beta1
88kind: Deployment
89metadata:
90 name: fluentdstby
91spec:
92 replicas: 1
93 template:
94 metadata:
95 labels:
96 app: fluentdstby
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -050097 annotations:
98 cni: "weave"
Richard Jankowskic9d89202018-01-25 10:25:10 -050099 spec:
100 terminationGracePeriodSeconds: 10
101 affinity:
102 podAntiAffinity:
103 requiredDuringSchedulingIgnoredDuringExecution:
104 - labelSelector:
105 matchExpressions:
106 - key: app
107 operator: In
108 values:
109 - fluentdactv
110 topologyKey: kubernetes.io/hostname
111 containers:
112 - name: fluentdstby
Richard Jankowskic3c291c2018-02-02 13:57:33 -0500113 image: voltha-fluentd
Richard Jankowskic9d89202018-01-25 10:25:10 -0500114 imagePullPolicy: Never
115 volumeMounts:
116 - name: fluentd-log
117 mountPath: /fluentd/log
118 ports:
119 - containerPort: 24224
120 env:
121 - name: FLUENTD_CONF
122 value: fluent-agg.conf
123 volumes:
124 - name: fluentd-log
125 hostPath:
126 path: /var/log/voltha/logging_volume
127 type: Directory
128---
129#
130# The cluster of fluentd forwarders
131#
132apiVersion: v1
133kind: Service
134metadata:
135 name: fluentd
136spec:
137 clusterIP: None
138 selector:
139 app: fluentd
140 ports:
141 - protocol: TCP
142 port: 24224
143 targetPort: 24224
144---
145apiVersion: apps/v1beta1
146kind: Deployment
147metadata:
148 name: fluentd
149spec:
150 replicas: 3
151 template:
152 metadata:
153 labels:
154 app: fluentd
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -0500155 annotations:
156 cni: "weave"
Richard Jankowskic9d89202018-01-25 10:25:10 -0500157 spec:
158 terminationGracePeriodSeconds: 10
159 affinity:
160 podAntiAffinity:
161 requiredDuringSchedulingIgnoredDuringExecution:
162 - labelSelector:
163 matchExpressions:
164 - key: app
165 operator: In
166 values:
167 - fluentd
168 topologyKey: kubernetes.io/hostname
169 containers:
170 - name: fluentd
Richard Jankowskic3c291c2018-02-02 13:57:33 -0500171 image: voltha-fluentd
Richard Jankowskic9d89202018-01-25 10:25:10 -0500172 imagePullPolicy: Never
173 ports:
174 - containerPort: 24224
175 env:
176 - name: FLUENTD_CONF
177 value: fluent.conf