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.

56 lines
1.7 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: Deployment
  5. metadata:
  6. name: elasticsearch-logging-v1
  7. namespace: "{{ system_namespace }}"
  8. labels:
  9. k8s-app: elasticsearch-logging
  10. version: "{{ elasticsearch_image_tag }}"
  11. kubernetes.io/cluster-service: "true"
  12. spec:
  13. replicas: 2
  14. selector:
  15. matchLabels:
  16. k8s-app: elasticsearch-logging
  17. version: "{{ elasticsearch_image_tag }}"
  18. template:
  19. metadata:
  20. labels:
  21. k8s-app: elasticsearch-logging
  22. version: "{{ elasticsearch_image_tag }}"
  23. kubernetes.io/cluster-service: "true"
  24. spec:
  25. containers:
  26. - image: "{{ elasticsearch_image_repo }}:{{ elasticsearch_image_tag }}"
  27. name: elasticsearch-logging
  28. resources:
  29. # need more cpu upon initialization, therefore burstable class
  30. limits:
  31. cpu: {{ elasticsearch_cpu_limit }}
  32. {% if elasticsearch_mem_limit is defined and elasticsearch_mem_limit != "0M" %}
  33. mem: {{ elasticsearch_mem_limit }}
  34. {% endif %}
  35. requests:
  36. cpu: {{ elasticsearch_cpu_requests }}
  37. {% if elasticsearch_mem_requests is defined and elasticsearch_mem_requests != "0M" %}
  38. mem: {{ elasticsearch_mem_requests }}
  39. {% endif %}
  40. ports:
  41. - containerPort: 9200
  42. name: db
  43. protocol: TCP
  44. - containerPort: 9300
  45. name: transport
  46. protocol: TCP
  47. volumeMounts:
  48. - name: es-persistent-storage
  49. mountPath: /data
  50. volumes:
  51. - name: es-persistent-storage
  52. emptyDir: {}
  53. {% if rbac_enabled %}
  54. serviceAccountName: efk
  55. {% endif %}