Skip to content

Commit

Permalink
[bitnami/valkey-sentinel] Release valkey-sentinel-7.2.7-debian-12-r1
Browse files Browse the repository at this point in the history
Signed-off-by: Bitnami Bot <bitnami-bot@vmware.com>
  • Loading branch information
bitnami-bot committed Oct 22, 2024
1 parent 700ff67 commit ef7f31e
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 71 deletions.
11 changes: 6 additions & 5 deletions bitnami/valkey-sentinel/7.2/debian-12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

FROM docker.io/bitnami/minideb:bookworm

ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
ARG TARGETARCH

LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2024-10-04T10:38:31Z" \
org.opencontainers.image.created="2024-10-22T21:44:31Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/valkey-sentinel/README.md" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="7.2.7-debian-12-r0" \
org.opencontainers.image.ref.name="7.2.7-debian-12-r1" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/valkey-sentinel" \
org.opencontainers.image.title="valkey-sentinel" \
org.opencontainers.image.vendor="Broadcom, Inc." \
Expand All @@ -29,12 +30,12 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
RUN install_packages ca-certificates curl libssl3 procps
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
COMPONENTS=( \
"valkey-sentinel-7.2.7-0-linux-${OS_ARCH}-debian-12" \
"valkey-sentinel-7.2.7-4-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
curl -SsLf "https://downloads.bitnami.com/files/stacksmith/${COMPONENT}.tar.gz" -O ; \
curl -SsLf "https://downloads.bitnami.com/files/stacksmith/${COMPONENT}.tar.gz.sha256" -O ; \
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
fi ; \
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"arch": "amd64",
"distro": "debian-12",
"type": "NAMI",
"version": "7.2.7-0"
"version": "7.2.7-4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ valkey_validate() {
if ! is_boolean_yes "$VALKEY_SENTINEL_TLS_ENABLED" || [[ "$VALKEY_SENTINEL_PORT_NUMBER" != "0" ]]; then
check_allowed_port VALKEY_SENTINEL_PORT_NUMBER
fi
check_resolved_hostname "$VALKEY_MASTER_HOST"
check_resolved_hostname "$VALKEY_PRIMARY_HOST"

if is_boolean_yes "$VALKEY_SENTINEL_TLS_ENABLED"; then
if [[ "$VALKEY_SENTINEL_PORT_NUMBER" == "$VALKEY_SENTINEL_TLS_PORT_NUMBER" ]] && [[ "$VALKEY_SENTINEL_PORT_NUMBER" != "26379" ]]; then
Expand Down Expand Up @@ -213,14 +213,14 @@ valkey_initialize() {

[[ -z "$VALKEY_SENTINEL_PASSWORD" ]] || valkey_conf_set "requirepass" "$VALKEY_SENTINEL_PASSWORD"

# Master set
# Primary set
# shellcheck disable=SC2153
valkey_conf_set "sentinel monitor" "${VALKEY_MASTER_SET} ${VALKEY_MASTER_HOST} ${VALKEY_MASTER_PORT_NUMBER} ${VALKEY_SENTINEL_QUORUM}"
valkey_conf_set "sentinel down-after-milliseconds" "${VALKEY_MASTER_SET} ${VALKEY_SENTINEL_DOWN_AFTER_MILLISECONDS}"
valkey_conf_set "sentinel failover-timeout" "${VALKEY_MASTER_SET} ${VALKEY_SENTINEL_FAILOVER_TIMEOUT}"
valkey_conf_set "sentinel parallel-syncs" "${VALKEY_MASTER_SET} 1"
[[ -z "$VALKEY_MASTER_PASSWORD" ]] || valkey_conf_set "sentinel auth-pass" "${VALKEY_MASTER_SET} ${VALKEY_MASTER_PASSWORD}"
[[ -z "$VALKEY_MASTER_USER" ]] || valkey_conf_set "sentinel auth-user" "${VALKEY_MASTER_SET} ${VALKEY_MASTER_USER}"
valkey_conf_set "sentinel monitor" "${VALKEY_PRIMARY_SET} ${VALKEY_PRIMARY_HOST} ${VALKEY_PRIMARY_PORT_NUMBER} ${VALKEY_SENTINEL_QUORUM}"
valkey_conf_set "sentinel down-after-milliseconds" "${VALKEY_PRIMARY_SET} ${VALKEY_SENTINEL_DOWN_AFTER_MILLISECONDS}"
valkey_conf_set "sentinel failover-timeout" "${VALKEY_PRIMARY_SET} ${VALKEY_SENTINEL_FAILOVER_TIMEOUT}"
valkey_conf_set "sentinel parallel-syncs" "${VALKEY_PRIMARY_SET} 1"
[[ -z "$VALKEY_PRIMARY_PASSWORD" ]] || valkey_conf_set "sentinel auth-pass" "${VALKEY_PRIMARY_SET} ${VALKEY_PRIMARY_PASSWORD}"
[[ -z "$VALKEY_PRIMARY_USER" ]] || valkey_conf_set "sentinel auth-user" "${VALKEY_PRIMARY_SET} ${VALKEY_PRIMARY_USER}"
[[ -z "$VALKEY_SENTINEL_ANNOUNCE_IP" ]] || valkey_conf_set "sentinel announce-ip" "${VALKEY_SENTINEL_ANNOUNCE_IP}"
[[ -z "$VALKEY_SENTINEL_ANNOUNCE_PORT" ]] || valkey_conf_set "sentinel announce-port" "${VALKEY_SENTINEL_ANNOUNCE_PORT}"
# Sentinel's configuration was refactored for Valkey 6.2 and hostname's support now has to be enabled using a configuration parameter
Expand All @@ -229,7 +229,7 @@ valkey_initialize() {
valkey_conf_set "sentinel announce-hostnames" "${VALKEY_SENTINEL_ANNOUNCE_HOSTNAMES}"
fi
# This directive is only available in Valkey 7
[[ $(valkey_version --major) -ge 7 ]] && valkey_conf_set "SENTINEL master-reboot-down-after-period" "${VALKEY_MASTER_SET} ${VALKEY_SENTINEL_MASTER_REBOOT_DOWN_AFTER_PERIOD}"
[[ $(valkey_version --major) -ge 7 ]] && valkey_conf_set "SENTINEL primary-reboot-down-after-period" "${VALKEY_PRIMARY_SET} ${VALKEY_SENTINEL_PRIMARY_REBOOT_DOWN_AFTER_PERIOD}"

# Sentinel Configuration (maybe overwritten by more specific init blocks like TLS configuration)
valkey_conf_set port "$VALKEY_SENTINEL_PORT_NUMBER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ valkey_sentinel_env_vars=(
VALKEY_SENTINEL_DATABASE
VALKEY_SENTINEL_AOF_ENABLED
VALKEY_SENTINEL_HOST
VALKEY_SENTINEL_MASTER_NAME
VALKEY_SENTINEL_PRIMARY_NAME
VALKEY_SENTINEL_PORT_NUMBER
VALKEY_SENTINEL_QUORUM
VALKEY_SENTINEL_DOWN_AFTER_MILLISECONDS
VALKEY_SENTINEL_FAILOVER_TIMEOUT
VALKEY_SENTINEL_MASTER_REBOOT_DOWN_AFTER_PERIOD
VALKEY_SENTINEL_PRIMARY_REBOOT_DOWN_AFTER_PERIOD
VALKEY_SENTINEL_RESOLVE_HOSTNAMES
VALKEY_SENTINEL_ANNOUNCE_HOSTNAMES
ALLOW_EMPTY_PASSWORD
VALKEY_SENTINEL_PASSWORD
VALKEY_MASTER_USER
VALKEY_MASTER_PASSWORD
VALKEY_PRIMARY_USER
VALKEY_PRIMARY_PASSWORD
VALKEY_SENTINEL_ANNOUNCE_IP
VALKEY_SENTINEL_ANNOUNCE_PORT
VALKEY_SENTINEL_TLS_ENABLED
Expand All @@ -50,9 +50,9 @@ valkey_sentinel_env_vars=(
VALKEY_SENTINEL_TLS_CA_FILE
VALKEY_SENTINEL_TLS_DH_PARAMS_FILE
VALKEY_SENTINEL_TLS_AUTH_CLIENTS
VALKEY_MASTER_HOST
VALKEY_MASTER_PORT_NUMBER
VALKEY_MASTER_SET
VALKEY_PRIMARY_HOST
VALKEY_PRIMARY_PORT_NUMBER
VALKEY_PRIMARY_SET
)
for env_var in "${valkey_sentinel_env_vars[@]}"; do
file_env_var="${env_var}_FILE"
Expand Down Expand Up @@ -90,19 +90,19 @@ export VALKEY_SENTINEL_DISABLE_COMMANDS="${VALKEY_SENTINEL_DISABLE_COMMANDS:-}"
export VALKEY_SENTINEL_DATABASE="${VALKEY_SENTINEL_DATABASE:-valkey}"
export VALKEY_SENTINEL_AOF_ENABLED="${VALKEY_SENTINEL_AOF_ENABLED:-yes}"
export VALKEY_SENTINEL_HOST="${VALKEY_SENTINEL_HOST:-}"
export VALKEY_SENTINEL_MASTER_NAME="${VALKEY_SENTINEL_MASTER_NAME:-}"
export VALKEY_SENTINEL_PRIMARY_NAME="${VALKEY_SENTINEL_PRIMARY_NAME:-}"
export VALKEY_SENTINEL_DEFAULT_PORT_NUMBER="26379" # only used at build time
export VALKEY_SENTINEL_PORT_NUMBER="${VALKEY_SENTINEL_PORT_NUMBER:-$VALKEY_SENTINEL_DEFAULT_PORT_NUMBER}"
export VALKEY_SENTINEL_QUORUM="${VALKEY_SENTINEL_QUORUM:-2}"
export VALKEY_SENTINEL_DOWN_AFTER_MILLISECONDS="${VALKEY_SENTINEL_DOWN_AFTER_MILLISECONDS:-60000}"
export VALKEY_SENTINEL_FAILOVER_TIMEOUT="${VALKEY_SENTINEL_FAILOVER_TIMEOUT:-180000}"
export VALKEY_SENTINEL_MASTER_REBOOT_DOWN_AFTER_PERIOD="${VALKEY_SENTINEL_MASTER_REBOOT_DOWN_AFTER_PERIOD:-0}"
export VALKEY_SENTINEL_PRIMARY_REBOOT_DOWN_AFTER_PERIOD="${VALKEY_SENTINEL_PRIMARY_REBOOT_DOWN_AFTER_PERIOD:-0}"
export VALKEY_SENTINEL_RESOLVE_HOSTNAMES="${VALKEY_SENTINEL_RESOLVE_HOSTNAMES:-yes}"
export VALKEY_SENTINEL_ANNOUNCE_HOSTNAMES="${VALKEY_SENTINEL_ANNOUNCE_HOSTNAMES:-no}"
export ALLOW_EMPTY_PASSWORD="${ALLOW_EMPTY_PASSWORD:-no}"
export VALKEY_SENTINEL_PASSWORD="${VALKEY_SENTINEL_PASSWORD:-}"
export VALKEY_MASTER_USER="${VALKEY_MASTER_USER:-}"
export VALKEY_MASTER_PASSWORD="${VALKEY_MASTER_PASSWORD:-}"
export VALKEY_PRIMARY_USER="${VALKEY_PRIMARY_USER:-}"
export VALKEY_PRIMARY_PASSWORD="${VALKEY_PRIMARY_PASSWORD:-}"
export VALKEY_SENTINEL_ANNOUNCE_IP="${VALKEY_SENTINEL_ANNOUNCE_IP:-}"
export VALKEY_SENTINEL_ANNOUNCE_PORT="${VALKEY_SENTINEL_ANNOUNCE_PORT:-}"

Expand All @@ -115,9 +115,9 @@ export VALKEY_SENTINEL_TLS_CA_FILE="${VALKEY_SENTINEL_TLS_CA_FILE:-}"
export VALKEY_SENTINEL_TLS_DH_PARAMS_FILE="${VALKEY_SENTINEL_TLS_DH_PARAMS_FILE:-}"
export VALKEY_SENTINEL_TLS_AUTH_CLIENTS="${VALKEY_SENTINEL_TLS_AUTH_CLIENTS:-yes}"

# Valkey Master settings
export VALKEY_MASTER_HOST="${VALKEY_MASTER_HOST:-valkey}"
export VALKEY_MASTER_PORT_NUMBER="${VALKEY_MASTER_PORT_NUMBER:-6379}"
export VALKEY_MASTER_SET="${VALKEY_MASTER_SET:-mymaster}"
# Valkey primary settings
export VALKEY_PRIMARY_HOST="${VALKEY_PRIMARY_HOST:-valkey}"
export VALKEY_PRIMARY_PORT_NUMBER="${VALKEY_PRIMARY_PORT_NUMBER:-6379}"
export VALKEY_PRIMARY_SET="${VALKEY_PRIMARY_SET:-myprimary}"

# Custom environment variables may be defined below
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ valkey_conf_set "pidfile" "$VALKEY_SENTINEL_PID_FILE"
# Send logs to stdout
valkey_conf_set "daemonize" "no"
valkey_conf_set "logfile" ""
# Starting from version 8.0, the default configuration file sets an incorrect value
# for the master that is causing the default startup command to fail. We fix it
# so our tests work as expected. This is likely to be fixed upstream.
# We reported the issue in the link below
# https://github.com/valkey-io/valkey/pull/647#issuecomment-2354933622
replace_in_file "$VALKEY_SENTINEL_CONF_FILE" "myprimary" "mymaster"

# Copy all initially generated configuration files to the default directory
# (this is to avoid breaking when entrypoint is being overridden)
Expand Down
Loading

0 comments on commit ef7f31e

Please sign in to comment.