[bitnami/redis-cluster] Release 8.8.0-debian-12-r3 (#94423)

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Bitnami Bot
2026-06-08 12:14:37 +02:00
committed by GitHub
parent 5ac55b882b
commit 41a5b7dda5
6 changed files with 51 additions and 6 deletions
@@ -7,7 +7,7 @@ ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
ARG TARGETARCH
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2026-06-04T12:14:14Z" \
org.opencontainers.image.created="2026-06-08T09:40:22Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/redis-cluster/README.md" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/redis-cluster" \
@@ -50,7 +50,7 @@ COPY rootfs /
RUN /opt/bitnami/scripts/redis-cluster/postunpack.sh
ENV APP_VERSION="8.8.0" \
BITNAMI_APP_NAME="redis-cluster" \
IMAGE_REVISION="2" \
IMAGE_REVISION="3" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/redis/bin:$PATH"
EXPOSE 6379
@@ -170,7 +170,7 @@ ensure_user_exists() {
if [[ -n "$home" ]]; then
mkdir -p "$home"
usermod -d "$home" "$user" >/dev/null 2>&1
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group"
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group" -n
fi
}
@@ -20,7 +20,7 @@
#########################
is_int() {
local -r int="${1:?missing value}"
if [[ "$int" =~ ^-?[0-9]+ ]]; then
if [[ "$int" =~ ^-?[0-9]+$ ]]; then
true
else
false
@@ -49,3 +49,36 @@ get_sematic_version () {
fi
fi
}
########################
# Compares two semantic versions
# Arguments:
# $1 - version1: first version to compare
# $2 - version2: second version to compare
# Returns:
# -1 if version1 is less than version2
# 0 if version1 is equal to version2
# 1 if version1 is greater than version2
#########################
compare_semantic_versions() {
local version1="${1:?version1 is required}"
local version2="${2:?version2 is required}"
local major1 major2 minor1 minor2 patch1 patch2
major1="$(get_sematic_version "$version1" 1)"
major2="$(get_sematic_version "$version2" 1)"
minor1="$(get_sematic_version "$version1" 2)"
minor2="$(get_sematic_version "$version2" 2)"
patch1="$(get_sematic_version "$version1" 3)"
patch2="$(get_sematic_version "$version2" 3)"
if [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -eq "$minor2" ]] && [[ "$patch1" -eq "$patch2" ]]; then
echo "0"
elif [[ "$major1" -lt "$major2" ]] ||
{ [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -lt "$minor2" ]]; } ||
{ [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -eq "$minor2" ]] && [[ "$patch1" -lt "$patch2" ]]; }; then
echo "-1"
else
echo "1"
fi
}
@@ -406,11 +406,11 @@ redis_configure_default() {
rm "${REDIS_BASE_DIR}/etc/redis-default.conf"
fi
cp "${REDIS_MOUNTED_CONF_DIR}/redis.conf" "${REDIS_BASE_DIR}/etc/redis.conf"
chmod 600 "${REDIS_BASE_DIR}/etc/redis.conf"
chmod 640 "${REDIS_BASE_DIR}/etc/redis.conf"
else
info "Setting Redis config file"
# We try to enforce strict permissions, but we don't fail if it's not possible
chmod 600 "${REDIS_BASE_DIR}/etc/redis.conf" || true
chmod 640 "${REDIS_BASE_DIR}/etc/redis.conf" || true
if is_boolean_yes "$ALLOW_EMPTY_PASSWORD"; then
# Allow remote connections without password
redis_conf_set protected-mode no
@@ -218,6 +218,18 @@ redis_cluster_update_ips() {
printf "%s=\"%s\"\n" "$key" "${host_2_ip_array[$key]}" >> "${REDIS_DATA_DIR}/nodes.sh"
done
else
info "Updating Redis cluster IPs"
# Safeguard to detect old format on nodes.sh
if grep -q "declare -A host_2_ip_array=" "${REDIS_DATA_DIR}/nodes.sh"; then
# Transform the old format to the new format in a sub-shell
(
source "${REDIS_DATA_DIR}/nodes.sh"
for host in "${!host_2_ip_array[@]}"; do
echo "${host}=\"${host_2_ip_array[$host]}\""
done
) > "${REDIS_DATA_DIR}/nodes.sh.new"
mv "${REDIS_DATA_DIR}/nodes.sh.new" "${REDIS_DATA_DIR}/nodes.sh"
fi
# The cluster was already started, let's read hosts and IPs from the nodes.sh file
while IFS= read -r line || [[ -n "$line" ]]; do
# Skip blank lines and shell comments