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.

51 lines
1.6 KiB

  1. ---
  2. # https://raw.githubusercontent.com/kubernetes/kubernetes/v1.5.2/cluster/addons/fluentd-elasticsearch/es-controller.yaml
  3. apiVersion: v1
  4. kind: ReplicationController
  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. k8s-app: elasticsearch-logging
  16. version: "{{ elasticsearch_image_tag }}"
  17. template:
  18. metadata:
  19. labels:
  20. k8s-app: elasticsearch-logging
  21. version: "{{ elasticsearch_image_tag }}"
  22. kubernetes.io/cluster-service: "true"
  23. spec:
  24. containers:
  25. - image: "{{ elasticsearch_image_repo }}:{{ elasticsearch_image_tag }}"
  26. name: elasticsearch-logging
  27. resources:
  28. # need more cpu upon initialization, therefore burstable class
  29. limits:
  30. cpu: {{ elasticsearch_cpu_limit }}
  31. {% if elasticsearch_mem_limit is defined and elasticsearch_mem_limit != "0M" %}
  32. mem: {{ elasticsearch_mem_limit }}
  33. {% endif %}
  34. requests:
  35. cpu: {{ elasticsearch_cpu_requests }}
  36. {% if elasticsearch_mem_requests is defined and elasticsearch_mem_requests != "0M" %}
  37. mem: {{ elasticsearch_mem_requests }}
  38. {% endif %}
  39. ports:
  40. - containerPort: 9200
  41. name: db
  42. protocol: TCP
  43. - containerPort: 9300
  44. name: transport
  45. protocol: TCP
  46. volumeMounts:
  47. - name: es-persistent-storage
  48. mountPath: /data
  49. volumes:
  50. - name: es-persistent-storage
  51. emptyDir: {}