c12s-kubespray/roles/kubernetes-apps/efk/fluentd/templates/fluentd-ds.yml.j2

69 lines
2.2 KiB
Text
Raw Normal View History

2017-01-26 23:33:01 +00:00
---
# https://raw.githubusercontent.com/kubernetes/kubernetes/v1.10.2/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml
apiVersion: apps/v1
2017-01-26 23:33:01 +00:00
kind: DaemonSet
metadata:
name: "fluentd-es-{{ fluentd_version }}"
namespace: "kube-system"
2017-01-26 23:33:01 +00:00
labels:
k8s-app: fluentd-es
version: "{{ fluentd_version }}"
kubernetes.io/cluster-service: "true"
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"
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: ''
spec:
priorityClassName: system-node-critical
serviceAccountName: efk
# When having win nodes in cluster without this patch, this pod cloud try to be created in windows
nodeSelector:
beta.kubernetes.io/os: linux
2017-01-26 23:33:01 +00:00
containers:
- name: fluentd-es
image: "{{ fluentd_image_repo }}:{{ fluentd_image_tag }}"
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:
cpu: {{ fluentd_cpu_requests }}
2017-01-26 23:33:01 +00:00
memory: {{ fluentd_mem_requests }}
volumeMounts:
- name: varlog
mountPath: /var/log
- 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
- name: config-volume
mountPath: "{{ fluentd_config_dir }}"
2017-01-26 23:33:01 +00:00
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
2017-01-26 23:33:01 +00:00
hostPath:
2018-01-05 15:18:22 +00:00
path: {{ docker_daemon_graph }}/containers
- name: config-volume
configMap:
name: fluentd-config