install_kibana.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ---
  2. - name: Check Kibana current replica count
  3. command: >
  4. {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get dc/logging-kibana
  5. -o jsonpath='{.spec.replicas}' -n {{openshift_logging_namespace}}
  6. register: kibana_replica_count
  7. when: not ansible_check_mode
  8. ignore_errors: yes
  9. changed_when: no
  10. - name: Check Kibana ops current replica count
  11. command: >
  12. {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get dc/logging-kibana-ops
  13. -o jsonpath='{.spec.replicas}' -n {{openshift_logging_namespace}}
  14. register: kibana_ops_replica_count
  15. when:
  16. - not ansible_check_mode
  17. - openshift_logging_use_ops | bool
  18. ignore_errors: yes
  19. changed_when: no
  20. - name: Generate kibana deploymentconfig
  21. template: src=kibana.j2 dest={{mktemp.stdout}}/templates/logging-kibana-dc.yaml
  22. vars:
  23. component: kibana
  24. logging_component: kibana
  25. deploy_name: "logging-{{component}}"
  26. image: "{{openshift_logging_image_prefix}}logging-kibana:{{openshift_logging_image_version}}"
  27. proxy_image: "{{openshift_logging_image_prefix}}logging-auth-proxy:{{openshift_logging_image_version}}"
  28. es_host: logging-es
  29. es_port: "{{openshift_logging_es_port}}"
  30. kibana_cpu_limit: "{{openshift_logging_kibana_cpu_limit }}"
  31. kibana_memory_limit: "{{openshift_logging_kibana_memory_limit }}"
  32. kibana_proxy_cpu_limit: "{{openshift_logging_kibana_proxy_cpu_limit }}"
  33. kibana_proxy_memory_limit: "{{openshift_logging_kibana_proxy_memory_limit }}"
  34. replicas: "{{kibana_replica_count.stdout | default (0)}}"
  35. kibana_node_selector: "{{openshift_logging_kibana_nodeselector | default({})}}"
  36. check_mode: no
  37. changed_when: no
  38. - name: Generate OPS kibana deploymentconfig
  39. template: src=kibana.j2 dest={{mktemp.stdout}}/templates/logging-kibana-ops-dc.yaml
  40. vars:
  41. component: kibana-ops
  42. logging_component: kibana
  43. deploy_name: "logging-{{component}}"
  44. image: "{{openshift_logging_image_prefix}}logging-kibana:{{openshift_logging_image_version}}"
  45. proxy_image: "{{openshift_logging_image_prefix}}logging-auth-proxy:{{openshift_logging_image_version}}"
  46. es_host: logging-es-ops
  47. es_port: "{{openshift_logging_es_ops_port}}"
  48. kibana_cpu_limit: "{{openshift_logging_kibana_ops_cpu_limit }}"
  49. kibana_memory_limit: "{{openshift_logging_kibana_ops_memory_limit }}"
  50. kibana_proxy_cpu_limit: "{{openshift_logging_kibana_ops_proxy_cpu_limit }}"
  51. kibana_proxy_memory_limit: "{{openshift_logging_kibana_ops_proxy_memory_limit }}"
  52. replicas: "{{kibana_ops_replica_count.stdout | default (0)}}"
  53. kibana_node_selector: "{{openshift_logging_kibana_ops_nodeselector | default({})}}"
  54. when: openshift_logging_use_ops | bool
  55. check_mode: no
  56. changed_when: no