curator.j2 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. {% if curator_node_selector is iterable and curator_node_selector | length > 0 %}
  32. nodeSelector:
  33. {% for key, value in curator_node_selector.iteritems() %}
  34. {{key}}: "{{value}}"
  35. {% endfor %}
  36. {% endif %}
  37. containers:
  38. -
  39. name: "curator"
  40. image: {{image}}
  41. imagePullPolicy: Always
  42. resources:
  43. limits:
  44. cpu: "{{curator_cpu_limit}}"
  45. {% if curator_memory_limit is defined and curator_memory_limit is not none and curator_memory_limit != "" %}
  46. memory: "{{curator_memory_limit}}"
  47. {% endif %}
  48. env:
  49. -
  50. name: "K8S_HOST_URL"
  51. value: "{{openshift_logging_curator_master_url}}"
  52. -
  53. name: "ES_HOST"
  54. value: "{{es_host}}"
  55. -
  56. name: "ES_PORT"
  57. value: "{{es_port}}"
  58. -
  59. name: "ES_CLIENT_CERT"
  60. value: "/etc/curator/keys/cert"
  61. -
  62. name: "ES_CLIENT_KEY"
  63. value: "/etc/curator/keys/key"
  64. -
  65. name: "ES_CA"
  66. value: "/etc/curator/keys/ca"
  67. -
  68. name: "CURATOR_DEFAULT_DAYS"
  69. value: "{{openshift_logging_curator_default_days}}"
  70. -
  71. name: "CURATOR_RUN_HOUR"
  72. value: "{{openshift_logging_curator_run_hour}}"
  73. -
  74. name: "CURATOR_RUN_MINUTE"
  75. value: "{{openshift_logging_curator_run_minute}}"
  76. -
  77. name: "CURATOR_RUN_TIMEZONE"
  78. value: "{{openshift_logging_curator_run_timezone}}"
  79. -
  80. name: "CURATOR_SCRIPT_LOG_LEVEL"
  81. value: "{{openshift_logging_curator_script_log_level}}"
  82. -
  83. name: "CURATOR_LOG_LEVEL"
  84. value: "{{openshift_logging_curator_log_level}}"
  85. volumeMounts:
  86. - name: certs
  87. mountPath: /etc/curator/keys
  88. readOnly: true
  89. - name: config
  90. mountPath: /etc/curator/settings
  91. readOnly: true
  92. - name: elasticsearch-storage
  93. mountPath: /elasticsearch/persistent
  94. readOnly: true
  95. volumes:
  96. - name: certs
  97. secret:
  98. secretName: logging-curator
  99. - name: config
  100. configMap:
  101. name: logging-curator
  102. - name: elasticsearch-storage
  103. emptyDir: {}