| {%- from "kubernetes/map.jinja" import common with context -%} |
| --- |
| apiVersion: extensions/v1beta1 |
| kind: DaemonSet |
| metadata: |
| name: fluentd-logger |
| namespace: {{ common.addons.fluentd.get('namespace', 'stacklight') }} |
| labels: |
| k8s-app: fluentd-logger |
| version: v1 |
| beta.kubernetes.io/fluentd-ds-ready: "true" |
| spec: |
| template: |
| metadata: |
| labels: |
| k8s-app: fluentd-logger |
| version: v1 |
| # This annotation ensures that fluentd does not get evicted if the node |
| # supports critical pod annotation based priority scheme. |
| # Note that this does not guarantee admission on the nodes (#40573). |
| annotations: |
| scheduler.alpha.kubernetes.io/critical-pod: '' |
| seccomp.security.alpha.kubernetes.io/pod: 'docker/default' |
| spec: |
| priorityClassName: system-node-critical |
| serviceAccountName: fluentd |
| tolerations: |
| - key: node-role.kubernetes.io/master |
| containers: |
| - name: fluentd-logger |
| image: {{ common.addons.fluentd.logger.get('image', 'fluent/fluentd-kubernetes-daemonset:v1.2-debian-stackdriver') }} |
| env: |
| - name: FLUENTD_AGGREGATOR_HOST |
| value: "fluentd-aggregator" |
| - name: FLUENTD_AGGREGATOR_PORT |
| value: "{{ common.addons.fluentd.aggregator.config.forward_input.bind.get('port', '24224') }}" |
| resources: |
| limits: |
| memory: {{ common.addons.fluentd.logger.resources.limits.get('memory', '500Mi') }} |
| requests: |
| memory: {{ common.addons.fluentd.logger.resources.requests.get('memory', '500Mi') }} |
| volumeMounts: |
| - name: varlog |
| mountPath: /var/log |
| - name: varlibdockercontainers |
| mountPath: /var/lib/docker/containers |
| readOnly: true |
| - name: fluentd-logger-config |
| mountPath: /fluentd/etc |
| readOnly: false |
| - name: runlog |
| mountPath: /run/log |
| terminationGracePeriodSeconds: 30 |
| volumes: |
| - name: varlog |
| hostPath: |
| path: /var/log |
| - name: varlibdockercontainers |
| hostPath: |
| path: /var/lib/docker/containers |
| - name: fluentd-logger-config |
| configMap: |
| name: fluentd-logger-cfg |
| - name: runlog |
| hostPath: |
| path: /run/log |