2017-01-26 23:33:01 +00:00
|
|
|
---
|
2018-05-14 17:56:18 +00:00
|
|
|
# https://raw.githubusercontent.com/kubernetes/kubernetes/v1.10.2/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml
|
2018-05-11 16:56:14 +00:00
|
|
|
apiVersion: apps/v1
|
2017-01-26 23:33:01 +00:00
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
2018-05-11 16:56:14 +00:00
|
|
|
name: "fluentd-es-{{ fluentd_version }}"
|
2018-03-30 11:29:13 +00:00
|
|
|
namespace: "kube-system"
|
2017-01-26 23:33:01 +00:00
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
2018-05-11 16:56:14 +00:00
|
|
|
version: "{{ fluentd_version }}"
|
2018-05-14 17:56:18 +00:00
|
|
|
kubernetes.io/cluster-service: "true"
|
2018-05-11 16:56:14 +00:00
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
2017-01-26 23:33:01 +00:00
|
|
|
spec:
|
2018-05-13 19:39:27 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: fluentd-es
|
|
|
|
version: "{{ fluentd_version }}"
|
2017-01-26 23:33:01 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
|
|
|
kubernetes.io/cluster-service: "true"
|
2018-05-11 16:56:14 +00:00
|
|
|
version: "{{ fluentd_version }}"
|
2018-05-13 19:39:27 +00:00
|
|
|
# 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: ''
|
2018-05-14 17:56:18 +00:00
|
|
|
spec:
|
|
|
|
priorityClassName: system-node-critical
|
|
|
|
{% if rbac_enabled %}
|
|
|
|
serviceAccountName: efk
|
|
|
|
{% endif %}
|
2017-01-26 23:33:01 +00:00
|
|
|
containers:
|
|
|
|
- name: fluentd-es
|
|
|
|
image: "{{ fluentd_image_repo }}:{{ fluentd_image_tag }}"
|
2018-05-11 16:56:14 +00:00
|
|
|
env:
|
|
|
|
- name: FLUENTD_ARGS
|
|
|
|
value: "--no-supervisor -q"
|
2017-01-26 23:33:01 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
{% if fluentd_cpu_limit is defined and fluentd_cpu_limit != "0m" %}
|
2017-07-28 05:10:13 +00:00
|
|
|
cpu: {{ fluentd_cpu_limit }}
|
2017-01-26 23:33:01 +00:00
|
|
|
{% endif %}
|
|
|
|
memory: {{ fluentd_mem_limit }}
|
|
|
|
requests:
|
2018-05-14 17:56:18 +00:00
|
|
|
cpu: {{ fluentd_cpu_requests }}
|
2017-01-26 23:33:01 +00:00
|
|
|
memory: {{ fluentd_mem_requests }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: varlog
|
|
|
|
mountPath: /var/log
|
2018-05-14 17:56:18 +00:00
|
|
|
- name: varlibdockercontainers
|
2018-01-05 15:18:22 +00:00
|
|
|
mountPath: "{{ docker_daemon_graph }}/containers"
|
2017-01-26 23:33:01 +00:00
|
|
|
readOnly: true
|
2018-05-11 16:56:14 +00:00
|
|
|
- name: config-volume
|
2017-08-10 06:48:53 +00:00
|
|
|
mountPath: "{{ fluentd_config_dir }}"
|
2018-05-11 16:56:14 +00:00
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/fluentd-ds-ready: "true"
|
2017-01-26 23:33:01 +00:00
|
|
|
terminationGracePeriodSeconds: 30
|
|
|
|
volumes:
|
|
|
|
- name: varlog
|
|
|
|
hostPath:
|
|
|
|
path: /var/log
|
2018-05-14 17:56:18 +00:00
|
|
|
- name: varlibdockercontainers
|
2017-01-26 23:33:01 +00:00
|
|
|
hostPath:
|
2018-01-05 15:18:22 +00:00
|
|
|
path: {{ docker_daemon_graph }}/containers
|
2018-05-11 16:56:14 +00:00
|
|
|
- name: config-volume
|
2018-05-14 17:56:18 +00:00
|
|
|
configMap:
|
|
|
|
name: fluentd-config
|