You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.5 KiB

  1. ---
  2. # https://raw.githubusercontent.com/kubernetes/kubernetes/v1.5.2/cluster/addons/fluentd-elasticsearch/es-controller.yaml
  3. apiVersion: extensions/v1beta1
  4. kind: DaemonSet
  5. metadata:
  6. name: "fluentd-es-v{{ fluentd_version }}"
  7. namespace: "{{ system_namespace }}"
  8. labels:
  9. k8s-app: fluentd-es
  10. kubernetes.io/cluster-service: "true"
  11. version: "v{{ fluentd_version }}"
  12. spec:
  13. template:
  14. metadata:
  15. labels:
  16. k8s-app: fluentd-es
  17. kubernetes.io/cluster-service: "true"
  18. version: "v{{ fluentd_version }}"
  19. spec:
  20. containers:
  21. - name: fluentd-es
  22. image: "{{ fluentd_image_repo }}:{{ fluentd_image_tag }}"
  23. command:
  24. - '/bin/sh'
  25. - '-c'
  26. - '/usr/sbin/td-agent 2>&1 >> /var/log/fluentd.log'
  27. resources:
  28. limits:
  29. {% if fluentd_cpu_limit is defined and fluentd_cpu_limit != "0m" %}
  30. mem: {{ fluentd_cpu_limit }}
  31. {% endif %}
  32. memory: {{ fluentd_mem_limit }}
  33. requests:
  34. cpu: {{ fluentd_cpu_requests }}
  35. memory: {{ fluentd_mem_requests }}
  36. volumeMounts:
  37. - name: varlog
  38. mountPath: /var/log
  39. - name: varlibdockercontainers
  40. mountPath: /var/lib/docker/containers
  41. readOnly: true
  42. terminationGracePeriodSeconds: 30
  43. volumes:
  44. - name: varlog
  45. hostPath:
  46. path: /var/log
  47. - name: varlibdockercontainers
  48. hostPath:
  49. path: /var/lib/docker/containers