File tree Expand file tree Collapse file tree 6 files changed +112
-1
lines changed Expand file tree Collapse file tree 6 files changed +112
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
2+ {% block labels %}
3+ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+ {% endblock %}
5+
6+ {% block valkey_base_header %}{% endblock %}
7+
8+ {% import "macros.j2" as macros with context %}
9+
10+ {{ macros.configure_user(name='valkey', homedir='/run/valkey') }}
11+
12+ COPY extend_start.sh /usr/local/bin/kolla_extend_start
13+ RUN chmod 644 /usr/local/bin/kolla_extend_start
14+
15+ {{ macros.kolla_patch_sources() }}
16+
17+ {% block valkey_base_footer %}{% endblock %}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ ! -d " /var/log/kolla/valkey" ]]; then
4+ mkdir -p /var/log/kolla/valkey
5+ fi
6+
7+ if [[ $( stat -c %a /var/log/kolla/valkey) != " 755" ]]; then
8+ chmod 755 /var/log/kolla/valkey
9+ fi
Original file line number Diff line number Diff line change 1+ FROM {{ namespace }}/{{ image_prefix }}valkey-base:{{ tag }}
2+ {% block labels %}
3+ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+ {% endblock %}
5+
6+ {% block valkey_sentinel_header %}{% endblock %}
7+
8+ {% import "macros.j2" as macros with context %}
9+
10+ {% if base_package_type == 'rpm' %}
11+ {{ macros.enable_extra_repos(['epel'] ) }}
12+ {% set valkey_sentinel_packages = ['valkey' ] %}
13+ {% elif base_package_type == 'deb' %}
14+ {% set valkey_sentinel_packages = ['valkey-sentinel' ] %}
15+ {% endif %}
16+ {{ macros.install_packages(valkey_sentinel_packages | customizable("packages")) }}
17+
18+ COPY extend_start.sh /usr/local/bin/kolla_extend_start
19+ RUN chmod 644 /usr/local/bin/kolla_extend_start
20+
21+ {{ macros.kolla_patch_sources() }}
22+
23+ {% block valkey_sentinel_footer %}{% endblock %}
24+ {% block footer %}{% endblock %}
25+
26+ USER valkey
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ ! -d " /var/log/kolla/valkey" ]]; then
4+ mkdir -p /var/log/kolla/valkey
5+ fi
6+
7+ if [[ $( stat -c %a /var/log/kolla/valkey) != " 755" ]]; then
8+ chmod 755 /var/log/kolla/valkey
9+ fi
10+
11+ # The CONFIG REWRITE command rewrites the valkey.conf
12+ # file the server was started with, applying the minimal
13+ # changes needed to make it reflect the configuration
14+ # currently used by the server, which may be different
15+ # compared to the original one because of the use of
16+ # the CONFIG SET command.
17+ #
18+ # https://valkey.io/commands/config-rewrite/
19+ #
20+ # Because of above behaviour it's needed to
21+ # hack kolla's CMD.
22+ #
23+ # Without this hack
24+ # /usr/local/bin/kolla_set_configs --check
25+ # is always reporting changed.
26+ #
27+ # Therefore valkey-sentinel is always restarted
28+ # even if configuration is not changed from
29+ # kolla-ansible side.
30+ if [ ! -z " ${VALKEY_CONF} " ] && [ ! -z ${VALKEY_GEN_CONF} ]; then
31+ cp ${VALKEY_CONF} ${VALKEY_GEN_CONF}
32+ fi
Original file line number Diff line number Diff line change 1+ FROM {{ namespace }}/{{ image_prefix }}valkey-base:{{ tag }}
2+ {% block labels %}
3+ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+ {% endblock %}
5+
6+ {% block valkey_server_header %}{% endblock %}
7+
8+ {% import "macros.j2" as macros with context %}
9+
10+ {% if base_package_type == 'rpm' %}
11+ {{ macros.enable_extra_repos(['epel'] ) }}
12+ {% set valkey_server_packages = ['valkey' ] %}
13+ {% elif base_package_type == 'deb' %}
14+ {% set valkey_server_packages = ['valkey' ] %}
15+ {% endif %}
16+ {{ macros.install_packages(valkey_server_packages | customizable("packages")) }}
17+
18+ {{ macros.kolla_patch_sources() }}
19+
20+ {% block valkey_server_footer %}{% endblock %}
21+ {% block footer %}{% endblock %}
22+
23+ USER valkey
Original file line number Diff line number Diff line change 345345 'hsmusers-user' : {
346346 'uid' : 42493 , # This is not used, but the group ID is required.
347347 'gid' : 42493 ,
348- }
348+ },
349+ 'valkey-user' : {
350+ 'uid' : 42494 ,
351+ 'gid' : 42494 ,
352+ },
349353}
You can’t perform that action at this time.
0 commit comments