install_curator.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ---
  2. - name: Check Curator current replica count
  3. command: >
  4. {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get dc/logging-curator
  5. -o jsonpath='{.spec.replicas}' -n {{openshift_logging_namespace}}
  6. register: curator_replica_count
  7. when: not ansible_check_mode
  8. ignore_errors: yes
  9. changed_when: no
  10. - name: Check Curator ops current replica count
  11. command: >
  12. {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get dc/logging-curator-ops
  13. -o jsonpath='{.spec.replicas}' -n {{openshift_logging_namespace}}
  14. register: curator_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 curator deploymentconfig
  21. template: src=curator.j2 dest={{mktemp.stdout}}/templates/logging-curator-dc.yaml
  22. vars:
  23. component: curator
  24. logging_component: curator
  25. deploy_name: "logging-{{component}}"
  26. image: "{{openshift_logging_image_prefix}}logging-curator:{{openshift_logging_image_version}}"
  27. es_host: logging-es
  28. es_port: "{{openshift_logging_es_port}}"
  29. curator_cpu_limit: "{{openshift_logging_curator_cpu_limit }}"
  30. curator_memory_limit: "{{openshift_logging_curator_memory_limit }}"
  31. replicas: "{{curator_replica_count.stdout | default (0)}}"
  32. curator_node_selector: "{{openshift_logging_curator_nodeselector | default({})}}"
  33. check_mode: no
  34. changed_when: no
  35. - name: Generate OPS curator deploymentconfig
  36. template: src=curator.j2 dest={{mktemp.stdout}}/templates/logging-curator-ops-dc.yaml
  37. vars:
  38. component: curator-ops
  39. logging_component: curator
  40. deploy_name: "logging-{{component}}"
  41. image: "{{openshift_logging_image_prefix}}logging-curator:{{openshift_logging_image_version}}"
  42. es_host: logging-es-ops
  43. es_port: "{{openshift_logging_es_ops_port}}"
  44. curator_cpu_limit: "{{openshift_logging_curator_ops_cpu_limit }}"
  45. curator_memory_limit: "{{openshift_logging_curator_ops_memory_limit }}"
  46. replicas: "{{curator_ops_replica_count.stdout | default (0)}}"
  47. curator_node_selector: "{{openshift_logging_curator_ops_nodeselector | default({}) }}"
  48. when: openshift_logging_use_ops | bool
  49. check_mode: no
  50. changed_when: no