Add ability to set event_time_to_live

In order to have ability to clean events after certain time
event_time_to_live should be set.

Change-Id: Iaa40796108cacd4b3bcbd581b956c30e2e304fc2
Related-Prod: https://mirantis.jira.com/browse/PROD-20388
diff --git a/panko/files/pike/panko.conf.Debian b/panko/files/pike/panko.conf.Debian
index 0c4a4b7..9b45523 100644
--- a/panko/files/pike/panko.conf.Debian
+++ b/panko/files/pike/panko.conf.Debian
@@ -269,6 +269,9 @@
 # Number of seconds that events are kept in the database for (<= 0 means
 # forever). (integer value)
 #event_time_to_live = -1
+{%- if server.event_time_to_live is defined %}
+event_time_to_live = server.event_time_to_live
+{%- endif %}
 
 # DEPRECATED: The connection string used to connect to the event database -
 # rather use ${database.connection} (string value)
diff --git a/panko/files/queens/panko.conf.Debian b/panko/files/queens/panko.conf.Debian
index 91abca0..2a9d5ea 100644
--- a/panko/files/queens/panko.conf.Debian
+++ b/panko/files/queens/panko.conf.Debian
@@ -38,6 +38,9 @@
 # Number of seconds that events are kept in the database for (<= 0 means
 # forever). (integer value)
 #event_time_to_live = -1
+{%- if server.event_time_to_live is defined %}
+event_time_to_live = server.event_time_to_live
+{%- endif %}
 
 # DEPRECATED: The connection string used to connect to the event database -
 # rather use ${database.connection} (string value)
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index 5176570..a2c1cb1 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -2,6 +2,7 @@
   server:
     enabled: true
     version: pike
+    event_time_to_live: 10
     bind:
       host: 127.0.0.1
       port: 8977
diff --git a/tests/pillar/server_single.sls b/tests/pillar/server_single.sls
index 44fe17c..3ea39db 100644
--- a/tests/pillar/server_single.sls
+++ b/tests/pillar/server_single.sls
@@ -2,6 +2,7 @@
   server:
     enabled: true
     version: pike
+    event_time_to_live: 10
     bind:
       host: 127.0.0.1
       port: 8977