mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 11:20:18 +02:00
[bitnami/etcd] Release 3.6.11-debian-12-r5 (#93969)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -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-05-23T07:38:19Z" \
|
||||
org.opencontainers.image.created="2026-05-25T06:28:06Z" \
|
||||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
|
||||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/etcd/README.md" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/etcd" \
|
||||
@@ -50,7 +50,7 @@ COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/etcd/postunpack.sh
|
||||
ENV APP_VERSION="3.6.11" \
|
||||
BITNAMI_APP_NAME="etcd" \
|
||||
IMAGE_REVISION="4" \
|
||||
IMAGE_REVISION="5" \
|
||||
PATH="/opt/bitnami/common/bin:/opt/bitnami/etcd/bin:$PATH"
|
||||
|
||||
EXPOSE 2379 2380
|
||||
|
||||
@@ -19,7 +19,8 @@ set -o nounset
|
||||
read -r -a advertised_array <<< "$(tr ',;' ' ' <<< "$ETCD_ADVERTISE_CLIENT_URLS")"
|
||||
host="$(parse_uri "${advertised_array[0]}" "host")"
|
||||
port="$(parse_uri "${advertised_array[0]}" "port")"
|
||||
read -r -a extra_flags <<< "$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<< "$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
extra_flags+=("--endpoints=${host}:${port}")
|
||||
|
||||
# if ETCD_AUTO_TLS true or CA file not exists, just skip server cert verification
|
||||
|
||||
@@ -35,7 +35,8 @@ endpoints_as_host_port() {
|
||||
# from the cluster before running Helm upgrades that potentially scale
|
||||
# down the etcd cluster
|
||||
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(endpoints_as_host_port)")
|
||||
|
||||
if [[ -n "$ETCD_PREUPGRADE_START_DELAY" ]]; then
|
||||
|
||||
@@ -21,7 +21,8 @@ endpoints="$(etcdctl_get_endpoints)"
|
||||
read -r -a endpoints_array <<< "$(tr ',;' ' ' <<< "$endpoints")"
|
||||
for e in "${endpoints_array[@]}"; do
|
||||
debug "Using endpoint $e"
|
||||
read -r -a extra_flags <<< "$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<< "$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
extra_flags+=("--endpoints=$e")
|
||||
if etcdctl endpoint health "${extra_flags[@]}"; then
|
||||
info "Snapshotting the keyspace"
|
||||
|
||||
@@ -263,22 +263,6 @@ etcdctl_get_endpoints() {
|
||||
echo "${endpoints[*]}" | tr ' ' ','
|
||||
}
|
||||
|
||||
########################
|
||||
# Obtain etcdctl authentication flags to use
|
||||
# Globals:
|
||||
# ETCD_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# Array with extra flags to use for authentication
|
||||
#########################
|
||||
etcdctl_auth_flags() {
|
||||
local -a authFlags=()
|
||||
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && authFlags+=("--user" "root:$ETCD_ROOT_PASSWORD")
|
||||
echo "${authFlags[*]} $(etcdctl_auth_norbac_flags)"
|
||||
}
|
||||
|
||||
########################
|
||||
# Obtain etcdctl authentication flags to use (before RBAC is enabled)
|
||||
# Globals:
|
||||
@@ -346,7 +330,8 @@ etcd_configure_rbac() {
|
||||
########################
|
||||
is_new_etcd_cluster() {
|
||||
local -a extra_flags
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(etcdctl_get_endpoints)")
|
||||
! debug_execute etcdctl endpoint status --cluster "${extra_flags[@]}"
|
||||
}
|
||||
@@ -373,7 +358,8 @@ setup_etcd_active_endpoints() {
|
||||
port="$(parse_uri "${advertised_array[0]}" "port")"
|
||||
if [[ $cluster_size -gt 0 ]]; then
|
||||
for e in "${endpoints_array[@]}"; do
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
extra_flags+=("--endpoints=$e")
|
||||
if [[ "$e" != "$host:$port" ]] && etcdctl endpoint health "${extra_flags[@]}" >/dev/null 2>&1; then
|
||||
debug "$e endpoint is active"
|
||||
@@ -494,7 +480,8 @@ remove_old_member_if_exist() {
|
||||
if ! is_empty_value "$old_member_id"; then
|
||||
info "Removing old member $old_member_id"
|
||||
local -a extra_flags
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(etcdctl_get_endpoints)")
|
||||
etcdctl member remove "$old_member_id" "${extra_flags[@]}"
|
||||
fi
|
||||
@@ -512,7 +499,8 @@ remove_old_member_if_exist() {
|
||||
add_new_member() {
|
||||
info "Adding new member to existing cluster"
|
||||
local -a extra_flags
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(etcdctl_get_endpoints)")
|
||||
extra_flags+=("--peer-urls=$ETCD_INITIAL_ADVERTISE_PEER_URLS")
|
||||
mkdir -p "$(dirname $ETCD_NEW_MEMBERS_ENV_FILE)" || true
|
||||
@@ -731,7 +719,6 @@ etcd_initialize() {
|
||||
#########################
|
||||
add_self_to_cluster() {
|
||||
local -a extra_flags
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
# is_healthy_etcd_cluster will also set ETCD_ACTIVE_ENDPOINTS
|
||||
while ! is_healthy_etcd_cluster; do
|
||||
warn "Cluster not healthy, not adding self to cluster for now, keeping trying..."
|
||||
@@ -741,7 +728,9 @@ add_self_to_cluster() {
|
||||
# only send req to healthy nodes
|
||||
|
||||
if is_empty_value "$(get_member_id)"; then
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
extra_flags+=("--endpoints=${ETCD_ACTIVE_ENDPOINTS}" "--peer-urls=$ETCD_INITIAL_ADVERTISE_PEER_URLS")
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
while ! etcdctl member add "$ETCD_NAME" "${extra_flags[@]}" | grep "^ETCD_" >"$ETCD_NEW_MEMBERS_ENV_FILE"; do
|
||||
warn "Failed to add self to cluster, keeping trying..."
|
||||
sleep 10
|
||||
@@ -768,7 +757,8 @@ get_member_id() {
|
||||
local ret
|
||||
local -a extra_flags
|
||||
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_norbac_flags)"
|
||||
! is_empty_value "$ETCD_ROOT_PASSWORD" && export ETCDCTL_USER="root:$ETCD_ROOT_PASSWORD"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(etcdctl_get_endpoints)")
|
||||
ret=$(etcdctl "${extra_flags[@]}" member list | grep -w "$ETCD_INITIAL_ADVERTISE_PEER_URLS" | awk -F "," '{ print $1 }')
|
||||
# if not return zero
|
||||
|
||||
Reference in New Issue
Block a user