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

68 lines
2.1 KiB
Text
Raw Normal View History

2017-01-26 23:33:01 +00:00
---
# https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.10/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
kubernetes.io/cluster-service: "true"
version: "{{ fluentd_version }}"
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: ''
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 }}
memory: {{ fluentd_mem_requests }}
volumeMounts:
- name: varlog
mountPath: /var/log
2018-01-05 15:18:22 +00:00
- name: dockercontainers
mountPath: "{{ docker_daemon_graph }}/containers"
2017-01-26 23:33:01 +00:00
readOnly: true
- name: config-volume
mountPath: "{{ fluentd_config_dir }}"
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-01-05 15:18:22 +00:00
- name: dockercontainers
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
{% if rbac_enabled %}
serviceAccountName: efk
{% endif %}