kolla/docker/redis/redis-sentinel/Dockerfile.j2
Michal Arbet 9040d4f527 Fix redis-sentinel containers always reporting changed
The CONFIG REWRITE command rewrites the redis.conf
file the server was started with, applying the minimal
changes needed to make it reflect the configuration
currently used by the server, which may be different
compared to the original one because of the use of
the CONFIG SET command.

https://redis.io/commands/config-rewrite/

Because of above behaviour it's needed to
hack kolla's CMD.

Without this hack container's
/usr/local/bin/kolla_set_configs --check
is always reporting changed state even if
config is not changed.

Therefore redis containers are always restarted
by kolla-ansible. This patch is fixing this.

Change-Id: I8245b9e753fa4175dacfa679a078f63876b0d327
Partial-Bug: #1967664
2022-05-18 09:35:50 +00:00

24 lines
758 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}redis-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block redis_sentinel_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_package_type == 'rpm' %}
{% set redis_sentinel_packages = ['redis'] %}
{% elif base_package_type == 'deb' %}
{% set redis_sentinel_packages = ['redis-sentinel'] %}
{% endif %}
{{ macros.install_packages(redis_sentinel_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 644 /usr/local/bin/kolla_extend_start
{% block redis_sentinel_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER redis