generate_routes.yaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ---
  2. - set_fact: kibana_key={{ lookup('file', openshift_logging_kibana_key) | b64encode }}
  3. when: openshift_logging_kibana_key | trim | length > 0
  4. changed_when: false
  5. - set_fact: kibana_cert={{ lookup('file', openshift_logging_kibana_cert)| b64encode }}
  6. when: openshift_logging_kibana_cert | trim | length > 0
  7. changed_when: false
  8. - set_fact: kibana_ca={{ lookup('file', openshift_logging_kibana_ca)| b64encode }}
  9. when: openshift_logging_kibana_ca | trim | length > 0
  10. changed_when: false
  11. - set_fact: kibana_ca={{key_pairs | entry_from_named_pair('ca_file') }}
  12. when: kibana_ca is not defined
  13. changed_when: false
  14. - name: Generating logging routes
  15. template: src=route_reencrypt.j2 dest={{mktemp.stdout}}/templates/logging-logging-kibana-route.yaml
  16. tags: routes
  17. vars:
  18. obj_name: "logging-kibana"
  19. route_host: "{{openshift_logging_kibana_hostname}}"
  20. service_name: "logging-kibana"
  21. tls_key: "{{kibana_key | default('') | b64decode}}"
  22. tls_cert: "{{kibana_cert | default('') | b64decode}}"
  23. tls_ca_cert: "{{kibana_ca | b64decode}}"
  24. tls_dest_ca_cert: "{{key_pairs | entry_from_named_pair('ca_file')| b64decode }}"
  25. edge_term_policy: "{{openshift_logging_kibana_edge_term_policy | default('') }}"
  26. labels:
  27. component: support
  28. logging-infra: support
  29. provider: openshift
  30. changed_when: no
  31. - set_fact: kibana_ops_key={{ lookup('file', openshift_logging_kibana_ops_key) | b64encode }}
  32. when:
  33. - openshift_logging_use_ops | bool
  34. - "{{ openshift_logging_kibana_ops_key | trim | length > 0 }}"
  35. changed_when: false
  36. - set_fact: kibana_ops_cert={{ lookup('file', openshift_logging_kibana_ops_cert)| b64encode }}
  37. when:
  38. - openshift_logging_use_ops | bool
  39. - "{{openshift_logging_kibana_ops_cert | trim | length > 0}}"
  40. changed_when: false
  41. - set_fact: kibana_ops_ca={{ lookup('file', openshift_logging_kibana_ops_ca)| b64encode }}
  42. when:
  43. - openshift_logging_use_ops | bool
  44. - "{{openshift_logging_kibana_ops_ca | trim | length > 0}}"
  45. changed_when: false
  46. - set_fact: kibana_ops_ca={{key_pairs | entry_from_named_pair('ca_file') }}
  47. when:
  48. - openshift_logging_use_ops | bool
  49. - kibana_ops_ca is not defined
  50. changed_when: false
  51. - name: Generating logging ops routes
  52. template: src=route_reencrypt.j2 dest={{mktemp.stdout}}/templates/logging-logging-kibana-ops-route.yaml
  53. tags: routes
  54. vars:
  55. obj_name: "logging-kibana-ops"
  56. route_host: "{{openshift_logging_kibana_ops_hostname}}"
  57. service_name: "logging-kibana-ops"
  58. tls_key: "{{kibana_ops_key | default('') | b64decode}}"
  59. tls_cert: "{{kibana_ops_cert | default('') | b64decode}}"
  60. tls_ca_cert: "{{kibana_ops_ca | b64decode}}"
  61. tls_dest_ca_cert: "{{key_pairs | entry_from_named_pair('ca_file')| b64decode }}"
  62. edge_term_policy: "{{openshift_logging_kibana_edge_term_policy | default('') }}"
  63. labels:
  64. component: support
  65. logging-infra: support
  66. provider: openshift
  67. when: openshift_logging_use_ops | bool
  68. changed_when: no