curator.j2 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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: {{curator_replicas|default(1)}}
  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. requests:
  48. memory: "{{curator_memory_limit}}"
  49. {% endif %}
  50. env:
  51. -
  52. name: "K8S_HOST_URL"
  53. value: "{{openshift_logging_curator_master_url}}"
  54. -
  55. name: "ES_HOST"
  56. value: "{{es_host}}"
  57. -
  58. name: "ES_PORT"
  59. value: "{{es_port}}"
  60. -
  61. name: "ES_CLIENT_CERT"
  62. value: "/etc/curator/keys/cert"
  63. -
  64. name: "ES_CLIENT_KEY"
  65. value: "/etc/curator/keys/key"
  66. -
  67. name: "ES_CA"
  68. value: "/etc/curator/keys/ca"
  69. -
  70. name: "CURATOR_DEFAULT_DAYS"
  71. value: "{{openshift_logging_curator_default_days}}"
  72. -
  73. name: "CURATOR_RUN_HOUR"
  74. value: "{{openshift_logging_curator_run_hour}}"
  75. -
  76. name: "CURATOR_RUN_MINUTE"
  77. value: "{{openshift_logging_curator_run_minute}}"
  78. -
  79. name: "CURATOR_RUN_TIMEZONE"
  80. value: "{{openshift_logging_curator_run_timezone}}"
  81. -
  82. name: "CURATOR_SCRIPT_LOG_LEVEL"
  83. value: "{{openshift_logging_curator_script_log_level}}"
  84. -
  85. name: "CURATOR_LOG_LEVEL"
  86. value: "{{openshift_logging_curator_log_level}}"
  87. volumeMounts:
  88. - name: certs
  89. mountPath: /etc/curator/keys
  90. readOnly: true
  91. - name: config
  92. mountPath: /etc/curator/settings
  93. readOnly: true
  94. volumes:
  95. - name: certs
  96. secret:
  97. secretName: logging-curator
  98. - name: config
  99. configMap:
  100. name: logging-curator