blob: c8bfa30109d06c3c797490677bdfda22a5ab83dd [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
Richard Jankowskid4454382018-02-08 16:21:43 -050012 namespace: voltha
Richard Jankowskic9d89202018-01-25 10:25:10 -050013spec:
14 clusterIP: None
15 selector:
16 app: fluentdactv
17 ports:
18 - protocol: TCP
19 port: 24224
20 targetPort: 24224
21---
22#
23# Ensure that the active aggregator is not deployed to the
24# same node as the standby
25#
26apiVersion: apps/v1beta1
27kind: Deployment
28metadata:
29 name: fluentdactv
Richard Jankowskid4454382018-02-08 16:21:43 -050030 namespace: voltha
Richard Jankowskic9d89202018-01-25 10:25:10 -050031spec:
32 replicas: 1
33 template:
34 metadata:
35 labels:
36 app: fluentdactv
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -050037 annotations:
38 cni: "weave"
Richard Jankowskic9d89202018-01-25 10:25:10 -050039 spec:
40 terminationGracePeriodSeconds: 10
41 affinity:
42 podAntiAffinity:
43 requiredDuringSchedulingIgnoredDuringExecution:
44 - labelSelector:
45 matchExpressions:
46 - key: app
47 operator: In
48 values:
49 - fluentdstby
50 topologyKey: kubernetes.io/hostname
51 containers:
52 - name: fluentdactv
Richard Jankowskic3c291c2018-02-02 13:57:33 -050053 image: voltha-fluentd
Richard Jankowskic9d89202018-01-25 10:25:10 -050054 imagePullPolicy: Never
55 volumeMounts:
56 - name: fluentd-log
57 mountPath: /fluentd/log
58 ports:
59 - containerPort: 24224
60 env:
61 - name: FLUENTD_CONF
62 value: fluent-agg.conf
63 volumes:
64 - name: fluentd-log
65 hostPath:
66 path: /var/log/voltha/logging_volume
67 type: Directory
68---
69#
70# The standby fluentd aggregator
71#
72apiVersion: v1
73kind: Service
74metadata:
75 name: fluentdstby
Richard Jankowskid4454382018-02-08 16:21:43 -050076 namespace: voltha
Richard Jankowskic9d89202018-01-25 10:25:10 -050077spec:
78 clusterIP: None
79 selector:
80 app: fluentdstby
81 ports:
82 - protocol: TCP
83 port: 24224
84 targetPort: 24224
85---
86#
87# Ensure thet the standby aggregator is not deployed to the
88# same node as the active
89#
90apiVersion: apps/v1beta1
91kind: Deployment
92metadata:
93 name: fluentdstby
Richard Jankowskid4454382018-02-08 16:21:43 -050094 namespace: voltha
Richard Jankowskic9d89202018-01-25 10:25:10 -050095spec:
96 replicas: 1
97 template:
98 metadata:
99 labels:
100 app: fluentdstby
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -0500101 annotations:
102 cni: "weave"
Richard Jankowskic9d89202018-01-25 10:25:10 -0500103 spec:
104 terminationGracePeriodSeconds: 10
105 affinity:
106 podAntiAffinity:
107 requiredDuringSchedulingIgnoredDuringExecution:
108 - labelSelector:
109 matchExpressions:
110 - key: app
111 operator: In
112 values:
113 - fluentdactv
114 topologyKey: kubernetes.io/hostname
115 containers:
116 - name: fluentdstby
Richard Jankowskic3c291c2018-02-02 13:57:33 -0500117 image: voltha-fluentd
Richard Jankowskic9d89202018-01-25 10:25:10 -0500118 imagePullPolicy: Never
119 volumeMounts:
120 - name: fluentd-log
121 mountPath: /fluentd/log
122 ports:
123 - containerPort: 24224
124 env:
125 - name: FLUENTD_CONF
126 value: fluent-agg.conf
127 volumes:
128 - name: fluentd-log
129 hostPath:
130 path: /var/log/voltha/logging_volume
131 type: Directory
132---
133#
134# The cluster of fluentd forwarders
135#
136apiVersion: v1
137kind: Service
138metadata:
139 name: fluentd
Richard Jankowskid4454382018-02-08 16:21:43 -0500140 namespace: voltha
Richard Jankowskic9d89202018-01-25 10:25:10 -0500141spec:
142 clusterIP: None
143 selector:
144 app: fluentd
145 ports:
146 - protocol: TCP
147 port: 24224
148 targetPort: 24224
149---
150apiVersion: apps/v1beta1
151kind: Deployment
152metadata:
153 name: fluentd
Richard Jankowskid4454382018-02-08 16:21:43 -0500154 namespace: voltha
Richard Jankowskic9d89202018-01-25 10:25:10 -0500155spec:
156 replicas: 3
157 template:
158 metadata:
159 labels:
160 app: fluentd
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -0500161 annotations:
162 cni: "weave"
Richard Jankowskic9d89202018-01-25 10:25:10 -0500163 spec:
164 terminationGracePeriodSeconds: 10
165 affinity:
166 podAntiAffinity:
167 requiredDuringSchedulingIgnoredDuringExecution:
168 - labelSelector:
169 matchExpressions:
170 - key: app
171 operator: In
172 values:
173 - fluentd
174 topologyKey: kubernetes.io/hostname
175 containers:
176 - name: fluentd
Richard Jankowskic3c291c2018-02-02 13:57:33 -0500177 image: voltha-fluentd
Richard Jankowskic9d89202018-01-25 10:25:10 -0500178 imagePullPolicy: Never
179 ports:
180 - containerPort: 24224
181 env:
182 - name: FLUENTD_CONF
183 value: fluent.conf