curator.j2 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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: Recreate
  21. template:
  22. metadata:
  23. name: "{{deploy_name}}"
  24. labels:
  25. logging-infra: "{{logging_component}}"
  26. provider: openshift
  27. component: "{{component}}"
  28. spec:
  29. terminationGracePeriod: 600
  30. serviceAccountName: aggregated-logging-curator
  31. containers:
  32. -
  33. name: "curator"
  34. image: {{image}}
  35. imagePullPolicy: Always
  36. resources:
  37. limits:
  38. cpu: "{{curator_cpu_limit}}"
  39. {% if curator_memory_limit is defined and curator_memory_limit is not none %}
  40. memory: "{{curator_memory_limit}}"
  41. {% endif %}
  42. env:
  43. -
  44. name: "K8S_HOST_URL"
  45. value: "{{master_url}}"
  46. -
  47. name: "ES_HOST"
  48. value: "{{es_host}}"
  49. -
  50. name: "ES_PORT"
  51. value: "{{es_port}}"
  52. -
  53. name: "ES_CLIENT_CERT"
  54. value: "/etc/curator/keys/cert"
  55. -
  56. name: "ES_CLIENT_KEY"
  57. value: "/etc/curator/keys/key"
  58. -
  59. name: "ES_CA"
  60. value: "/etc/curator/keys/ca"
  61. -
  62. name: "CURATOR_DEFAULT_DAYS"
  63. value: "{{openshift_logging_curator_default_days}}"
  64. -
  65. name: "CURATOR_RUN_HOUR"
  66. value: "{{openshift_logging_curator_run_hour}}"
  67. -
  68. name: "CURATOR_RUN_MINUTE"
  69. value: "{{openshift_logging_curator_run_minute}}"
  70. -
  71. name: "CURATOR_RUN_TIMEZONE"
  72. value: "{{openshift_logging_curator_run_timezone}}"
  73. -
  74. name: "CURATOR_SCRIPT_LOG_LEVEL"
  75. value: "{{openshift_logging_curator_script_log_level}}"
  76. -
  77. name: "CURATOR_LOG_LEVEL"
  78. value: "{{openshift_logging_curator_log_level}}"
  79. volumeMounts:
  80. - name: certs
  81. mountPath: /etc/curator/keys
  82. readOnly: true
  83. - name: config
  84. mountPath: /usr/curator/settings
  85. readOnly: true
  86. - name: elasticsearch-storage
  87. mountPath: /elasticsearch/persistent
  88. readOnly: true
  89. volumes:
  90. - name: certs
  91. secret:
  92. secretName: logging-curator
  93. - name: config
  94. configMap:
  95. name: logging-curator
  96. - name: elasticsearch-storage
  97. emptyDir: {}