kibana.j2 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. apiVersion: "v1"
  2. kind: "DeploymentConfig"
  3. metadata:
  4. name: "{{deploy_name}}"
  5. labels:
  6. provider: openshift
  7. component: "{{component}}"
  8. logging-infra: "{{logging_component}}"
  9. spec:
  10. replicas: {{replicas|default(0)}}
  11. selector:
  12. provider: openshift
  13. component: "{{component}}"
  14. logging-infra: "{{logging_component}}"
  15. strategy:
  16. rollingParams:
  17. intervalSeconds: 1
  18. timeoutSeconds: 600
  19. updatePeriodSeconds: 1
  20. type: Rolling
  21. template:
  22. metadata:
  23. name: "{{deploy_name}}"
  24. labels:
  25. logging-infra: "{{logging_component}}"
  26. provider: openshift
  27. component: "{{component}}"
  28. spec:
  29. serviceAccountName: aggregated-logging-kibana
  30. containers:
  31. -
  32. name: "kibana"
  33. image: {{image}}
  34. imagePullPolicy: Always
  35. {% if (kibana_memory_limit is defined and kibana_memory_limit is not none) or (kibana_cpu_limit is defined and kibana_cpu_limit is not none) %}
  36. resources:
  37. limits:
  38. {% if kibana_cpu_limit is not none %}
  39. cpu: "{{kibana_cpu_limit}}"
  40. {% endif %}
  41. {% if kibana_memory_limit is not none %}
  42. memory: "{{kibana_memory_limit}}"
  43. {% endif %}
  44. {% endif %}
  45. env:
  46. - name: "ES_HOST"
  47. value: "{{es_host}}"
  48. - name: "ES_PORT"
  49. value: "{{es_port}}"
  50. volumeMounts:
  51. - name: kibana
  52. mountPath: /etc/kibana/keys
  53. readOnly: true
  54. -
  55. name: "kibana-proxy"
  56. image: {{proxy_image}}
  57. imagePullPolicy: Always
  58. {% if (kibana_proxy_memory_limit is defined and kibana_proxy_memory_limit is not none) or (kibana_proxy_cpu_limit is defined and kibana_proxy_cpu_limit is not none) %}
  59. resources:
  60. limits:
  61. {% if kibana_proxy_cpu_limit is not none %}
  62. cpu: "{{kibana_proxy_cpu_limit}}"
  63. {% endif %}
  64. {% if kibana_proxy_memory_limit is not none %}
  65. memory: "{{kibana_proxy_memory_limit}}"
  66. {% endif %}
  67. {% endif %}
  68. ports:
  69. -
  70. name: "oaproxy"
  71. containerPort: 3000
  72. env:
  73. -
  74. name: "OAP_BACKEND_URL"
  75. value: "http://localhost:5601"
  76. -
  77. name: "OAP_AUTH_MODE"
  78. value: "oauth2"
  79. -
  80. name: "OAP_TRANSFORM"
  81. value: "user_header,token_header"
  82. -
  83. name: "OAP_OAUTH_ID"
  84. value: kibana-proxy
  85. -
  86. name: "OAP_MASTER_URL"
  87. value: {{master_url}}
  88. -
  89. name: "OAP_PUBLIC_MASTER_URL"
  90. value: {{public_master_url}}
  91. -
  92. name: "OAP_LOGOUT_REDIRECT"
  93. value: {{public_master_url}}/console/logout
  94. -
  95. name: "OAP_MASTER_CA_FILE"
  96. value: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
  97. -
  98. name: "OAP_DEBUG"
  99. value: "{{openshift_logging_kibana_proxy_debug}}"
  100. volumeMounts:
  101. - name: kibana-proxy
  102. mountPath: /secret
  103. readOnly: true
  104. volumes:
  105. - name: kibana
  106. secret:
  107. secretName: logging-kibana
  108. - name: kibana-proxy
  109. secret:
  110. secretName: logging-kibana-proxy