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 |
| 12 | spec: |
| 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 | # |
| 25 | apiVersion: apps/v1beta1 |
| 26 | kind: Deployment |
| 27 | metadata: |
| 28 | name: fluentdactv |
| 29 | spec: |
| 30 | replicas: 1 |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: fluentdactv |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 35 | annotations: |
| 36 | cni: "weave" |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 37 | 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 Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 51 | image: voltha-fluentd |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 52 | 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 | # |
| 70 | apiVersion: v1 |
| 71 | kind: Service |
| 72 | metadata: |
| 73 | name: fluentdstby |
| 74 | spec: |
| 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 | # |
| 87 | apiVersion: apps/v1beta1 |
| 88 | kind: Deployment |
| 89 | metadata: |
| 90 | name: fluentdstby |
| 91 | spec: |
| 92 | replicas: 1 |
| 93 | template: |
| 94 | metadata: |
| 95 | labels: |
| 96 | app: fluentdstby |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 97 | annotations: |
| 98 | cni: "weave" |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 99 | 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 Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 113 | image: voltha-fluentd |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 114 | 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 | # |
| 132 | apiVersion: v1 |
| 133 | kind: Service |
| 134 | metadata: |
| 135 | name: fluentd |
| 136 | spec: |
| 137 | clusterIP: None |
| 138 | selector: |
| 139 | app: fluentd |
| 140 | ports: |
| 141 | - protocol: TCP |
| 142 | port: 24224 |
| 143 | targetPort: 24224 |
| 144 | --- |
| 145 | apiVersion: apps/v1beta1 |
| 146 | kind: Deployment |
| 147 | metadata: |
| 148 | name: fluentd |
| 149 | spec: |
| 150 | replicas: 3 |
| 151 | template: |
| 152 | metadata: |
| 153 | labels: |
| 154 | app: fluentd |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 155 | annotations: |
| 156 | cni: "weave" |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 157 | 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 Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 171 | image: voltha-fluentd |
Richard Jankowski | c9d8920 | 2018-01-25 10:25:10 -0500 | [diff] [blame] | 172 | imagePullPolicy: Never |
| 173 | ports: |
| 174 | - containerPort: 24224 |
| 175 | env: |
| 176 | - name: FLUENTD_CONF |
| 177 | value: fluent.conf |