kolla/docker/cron/Dockerfile.j2
Michal Arbet f229eb7e06 Make cron's logrotate schedule configurable
Kolla-ansible allows user to change logrotate.conf,
problem is that logrotate cron file is running
daily by default in all distros, this is sometimes
not enough. So, this patch is adding script and
way how to reconfigure schedule of logrotate job
(cron file).

Needed-By: https://review.opendev.org/c/openstack/kolla-ansible/+/813039

Change-Id: If31b08fcf45bafc0ab25498ece9208a576aae41b
2021-11-12 17:30:22 +01:00

29 lines
758 B
Django/Jinja

FROM {{ namespace }}/{{ infra_image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block cron_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_package_type == 'rpm' %}
{% set cron_packages = [
'cronie',
'logrotate'
] %}
{% elif base_package_type == 'deb' %}
{% set cron_packages = [
'cron',
'logrotate'
] %}
{% endif %}
{{ macros.install_packages(cron_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block cron_footer %}{% endblock %}
{% block footer %}{% endblock %}