Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 1 | # |
| 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 | # |
| 8 | apiVersion: v1 |
| 9 | kind: Service |
| 10 | metadata: |
| 11 | name: fluentdactv |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 12 | namespace: voltha |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 13 | spec: |
| 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 | # |
| 26 | apiVersion: apps/v1beta1 |
| 27 | kind: Deployment |
| 28 | metadata: |
| 29 | name: fluentdactv |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 30 | namespace: voltha |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 31 | spec: |
| 32 | replicas: 1 |
| 33 | template: |
| 34 | metadata: |
| 35 | labels: |
| 36 | app: fluentdactv |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 37 | annotations: |
| 38 | cni: "weave" |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 39 | 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 Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 53 | image: voltha-fluentd |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 54 | 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 | # |
| 72 | apiVersion: v1 |
| 73 | kind: Service |
| 74 | metadata: |
| 75 | name: fluentdstby |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 76 | namespace: voltha |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 77 | spec: |
| 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 | # |
| 90 | apiVersion: apps/v1beta1 |
| 91 | kind: Deployment |
| 92 | metadata: |
| 93 | name: fluentdstby |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 94 | namespace: voltha |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 95 | spec: |
| 96 | replicas: 1 |
| 97 | template: |
| 98 | metadata: |
| 99 | labels: |
| 100 | app: fluentdstby |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 101 | annotations: |
| 102 | cni: "weave" |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 103 | 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 Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 117 | image: voltha-fluentd |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 118 | 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 | # |
| 136 | apiVersion: v1 |
| 137 | kind: Service |
| 138 | metadata: |
| 139 | name: fluentd |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 140 | namespace: voltha |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 141 | spec: |
| 142 | clusterIP: None |
| 143 | selector: |
| 144 | app: fluentd |
| 145 | ports: |
| 146 | - protocol: TCP |
| 147 | port: 24224 |
| 148 | targetPort: 24224 |
| 149 | --- |
| 150 | apiVersion: apps/v1beta1 |
| 151 | kind: Deployment |
| 152 | metadata: |
| 153 | name: fluentd |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 154 | namespace: voltha |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 155 | spec: |
| 156 | replicas: 3 |
| 157 | template: |
| 158 | metadata: |
| 159 | labels: |
| 160 | app: fluentd |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 161 | annotations: |
| 162 | cni: "weave" |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 163 | 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 Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 177 | image: voltha-fluentd |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 178 | imagePullPolicy: Never |
| 179 | ports: |
| 180 | - containerPort: 24224 |
| 181 | env: |
| 182 | - name: FLUENTD_CONF |
| 183 | value: fluent.conf |