Adding more logrotate config options for haproxy
Related-Prod: PROD-34348
Change-Id: I6cae418a3f8ae155ebe99dfca67a64079c003eaf
diff --git a/haproxy/meta/logrotate.yml b/haproxy/meta/logrotate.yml
index 9590a5b..a25a7f9 100644
--- a/haproxy/meta/logrotate.yml
+++ b/haproxy/meta/logrotate.yml
@@ -1,4 +1,5 @@
-## Default: Daily rotation with 52 rotations kept
+## Default: Daily rotation with 52 rotations kept and maxsize/size at 100M
+## Note : Logrotate job run as syslog user
{%- from "haproxy/map.jinja" import proxy with context %}
{%- if proxy.get('enabled', False) %}
job:
@@ -6,8 +7,11 @@
- files:
- /var/log/haproxy.log
options:
+ - su syslog syslog
- {{ proxy.get('logrotate', {}).get('interval', 'daily') }}
- rotate: {{ proxy.get('logrotate', {}).get('rotate', 52) }}
+ - size: {{ proxy.get('logrotate', {}).get('size', '100M') }}
+ - maxsize: {{ proxy.get('logrotate', {}).get('maxsize', '100M') }}
- missingok
- compress
- delaycompress