mirror of
https://github.com/bitnami/containers.git
synced 2026-02-11 14:37:20 +08:00
[bitnami/etcd] Release etcd-3.5.17-debian-12-r4 (#76442)
Signed-off-by: Bitnami Bot <bitnami-bot@vmware.com>
This commit is contained in:
@@ -8,11 +8,11 @@ ARG TARGETARCH
|
||||
|
||||
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
|
||||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2025-01-17T00:13:10Z" \
|
||||
org.opencontainers.image.created="2025-01-20T07:57:31Z" \
|
||||
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.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="3.5.17-debian-12-r3" \
|
||||
org.opencontainers.image.ref.name="3.5.17-debian-12-r4" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/etcd" \
|
||||
org.opencontainers.image.title="etcd" \
|
||||
org.opencontainers.image.vendor="Broadcom, Inc." \
|
||||
@@ -29,7 +29,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
|
||||
RUN install_packages ca-certificates curl procps
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
|
||||
COMPONENTS=( \
|
||||
"yq-4.45.1-0-linux-${OS_ARCH}-debian-12" \
|
||||
"yq-4.45.1-1-linux-${OS_ARCH}-debian-12" \
|
||||
"etcd-3.5.17-2-linux-${OS_ARCH}-debian-12" \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"arch": "amd64",
|
||||
"distro": "debian-12",
|
||||
"type": "NAMI",
|
||||
"version": "4.45.1-0"
|
||||
"version": "4.45.1-1"
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ set -o nounset
|
||||
# String
|
||||
########################
|
||||
endpoints_as_host_port() {
|
||||
echo $ETCD_INITIAL_CLUSTER | tr -s ',' '\n' | awk -F '//' '{print $2}' | tr -s '\n' ',' | sed 's/,$//'
|
||||
echo "$ETCD_INITIAL_CLUSTER" | tr -s ',' '\n' | awk -F '//' '{print $2}' | tr -s '\n' ',' | sed 's/,$//'
|
||||
}
|
||||
|
||||
# Remove members that are not listed in ETCD_INITIAL_CLUSTER
|
||||
@@ -38,22 +38,21 @@ endpoints_as_host_port() {
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(endpoints_as_host_port)")
|
||||
debug "Listing members"
|
||||
if ! current="$(etcdctl member list ${extra_flags[@]} --write-out simple | awk -F ", " '{print $3 ":" $1}')"; then
|
||||
if ! current="$(etcdctl member list "${extra_flags[@]}" --write-out simple | awk -F ", " '{print $3 ":" $1}')"; then
|
||||
error "Unable to list members, are all members healthy?"
|
||||
exit 1
|
||||
fi
|
||||
info "Current cluster members are: $(echo "$current" | awk -F: '{print $1}' | tr -s '\n' ',' | sed 's/,$//g')"
|
||||
|
||||
expected="$(echo $ETCD_INITIAL_CLUSTER | tr -s ',' '\n' | awk -F= '{print $1}')"
|
||||
expected="$(echo "$ETCD_INITIAL_CLUSTER" | tr -s ',' '\n' | awk -F= '{print $1}')"
|
||||
info "Expected cluster members are: $(echo "$expected" | tr -s '\n' ',' | sed 's/,$//g')"
|
||||
|
||||
read -r -a obsolete_members <<<"$(comm -23 <(echo "$current" | awk -F: '{print $1}' | sort) <(echo "$expected" | sort) | tr -s '\n' ' ')"
|
||||
if [ ${#obsolete_members[@]} -eq 0 ]; then
|
||||
if [[ "${#obsolete_members[@]}" -eq 0 ]]; then
|
||||
info "No obsolete members to remove."
|
||||
else
|
||||
for member in "${obsolete_members[@]}"; do
|
||||
info "Removing obsolete member $member"
|
||||
etcdctl member remove ${extra_flags[@]} "$(echo "$current" | grep "$member" | awk -F: '{print $2}')"
|
||||
etcdctl member remove "${extra_flags[@]}" "$(echo "$current" | grep "$member" | awk -F: '{print $2}')"
|
||||
done
|
||||
fi
|
||||
info "Pre-upgrade checks completed!"
|
||||
info "Pre-upgrade checks completed!"
|
||||
|
||||
@@ -343,7 +343,7 @@ is_new_etcd_cluster() {
|
||||
local -a extra_flags
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(etcdctl_get_endpoints)")
|
||||
! debug_execute etcdctl endpoint status --cluster ${extra_flags[@]}
|
||||
! debug_execute etcdctl endpoint status --cluster "${extra_flags[@]}"
|
||||
}
|
||||
|
||||
########################
|
||||
@@ -505,8 +505,8 @@ remove_old_member_if_exist() {
|
||||
# None
|
||||
#########################
|
||||
add_new_member() {
|
||||
local -a extra_flags
|
||||
info "Adding new member to existing cluster"
|
||||
local -a extra_flags
|
||||
read -r -a extra_flags <<<"$(etcdctl_auth_flags)"
|
||||
is_boolean_yes "$ETCD_ON_K8S" && extra_flags+=("--endpoints=$(etcdctl_get_endpoints)")
|
||||
extra_flags+=("--peer-urls=$ETCD_INITIAL_ADVERTISE_PEER_URLS")
|
||||
@@ -525,14 +525,13 @@ add_new_member() {
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
is_membership_intact() {
|
||||
is_node_still_a_member() {
|
||||
local tmp_file
|
||||
local start_command=("etcd")
|
||||
local pid
|
||||
local ret=0
|
||||
|
||||
tmp_file=$(mktemp)
|
||||
trap "rm -f $tmp_file" RETURN
|
||||
tmp_file="$(mktemp)"
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f ${tmp_file}" RETURN
|
||||
|
||||
am_i_root && start_command=("run_as_user" "$ETCD_DAEMON_USER" "${start_command[@]}")
|
||||
[[ -f "$ETCD_CONF_FILE" ]] && start_command+=("--config-file" "$ETCD_CONF_FILE")
|
||||
@@ -542,7 +541,6 @@ is_membership_intact() {
|
||||
debug_execute echo "$line"
|
||||
if [[ "$line" =~ (established TCP streaming connection with remote peer|the member has been permanently removed from the cluster|ignored streaming request; ID mismatch|\"error\":\"cluster ID mismatch\") ]]; then
|
||||
etcd_stop
|
||||
debug "Stopped etcd"
|
||||
break
|
||||
fi
|
||||
done < <(tail -f "$tmp_file")
|
||||
@@ -691,7 +689,7 @@ etcd_initialize() {
|
||||
fi
|
||||
else
|
||||
info "Cluster is healthy"
|
||||
if ! is_membership_intact; then
|
||||
if ! is_node_still_a_member; then
|
||||
rm -rf "$ETCD_DATA_DIR"
|
||||
remove_old_member_if_exist
|
||||
add_new_member
|
||||
|
||||
@@ -216,25 +216,25 @@ Apart from providing your custom configuration file, you can also modify the ser
|
||||
|
||||
#### Read-only environment variables
|
||||
|
||||
| Name | Description | Value |
|
||||
|------------------------------|----------------------------------------------------------------------|------------------------------------|
|
||||
| `ETCD_BASE_DIR` | etcd installation directory. | `/opt/bitnami/etcd` |
|
||||
| `ETCD_VOLUME_DIR` | Persistence base directory. | `/bitnami/etcd` |
|
||||
| `ETCD_BIN_DIR` | etcd executables directory. | `${ETCD_BASE_DIR}/bin` |
|
||||
| `ETCD_DATA_DIR` | etcd data directory. | `${ETCD_VOLUME_DIR}/data` |
|
||||
| `ETCD_CONF_DIR` | etcd configuration directory. | `${ETCD_BASE_DIR}/conf` |
|
||||
| `ETCD_DEFAULT_CONF_DIR` | etcd default configuration directory. | `${ETCD_BASE_DIR}/conf.default` |
|
||||
| `ETCD_TMP_DIR` | Directory where ETCD temporary files are stored. | `${ETCD_BASE_DIR}/tmp` |
|
||||
| `ETCD_CONF_FILE` | ETCD configuration file. | `${ETCD_CONF_DIR}/etcd.yaml` |
|
||||
| `ETCD_NEW_MEMBERS_ENV_FILE` | File containining the etcd environment to use after adding a member. | `${ETCD_DATA_DIR}/new_member_envs` |
|
||||
| `ETCD_DAEMON_USER` | etcd system user name. | `etcd` |
|
||||
| `ETCD_DAEMON_GROUP` | etcd system user group. | `etcd` |
|
||||
| Name | Description | Value |
|
||||
|-----------------------------|----------------------------------------------------------------------|------------------------------------|
|
||||
| `ETCD_BASE_DIR` | etcd installation directory. | `/opt/bitnami/etcd` |
|
||||
| `ETCD_VOLUME_DIR` | Persistence base directory. | `/bitnami/etcd` |
|
||||
| `ETCD_BIN_DIR` | etcd executables directory. | `${ETCD_BASE_DIR}/bin` |
|
||||
| `ETCD_DATA_DIR` | etcd data directory. | `${ETCD_VOLUME_DIR}/data` |
|
||||
| `ETCD_CONF_DIR` | etcd configuration directory. | `${ETCD_BASE_DIR}/conf` |
|
||||
| `ETCD_DEFAULT_CONF_DIR` | etcd default configuration directory. | `${ETCD_BASE_DIR}/conf.default` |
|
||||
| `ETCD_TMP_DIR` | Directory where ETCD temporary files are stored. | `${ETCD_BASE_DIR}/tmp` |
|
||||
| `ETCD_CONF_FILE` | ETCD configuration file. | `${ETCD_CONF_DIR}/etcd.yaml` |
|
||||
| `ETCD_NEW_MEMBERS_ENV_FILE` | File containining the etcd environment to use after adding a member. | `${ETCD_DATA_DIR}/new_member_envs` |
|
||||
| `ETCD_DAEMON_USER` | etcd system user name. | `etcd` |
|
||||
| `ETCD_DAEMON_GROUP` | etcd system user group. | `etcd` |
|
||||
|
||||
Additionally, you can configure etcd using the upstream env variables [here](https://etcd.io/docs/v3.4/op-guide/configuration/)
|
||||
|
||||
## Notable Changes
|
||||
|
||||
### 3.5.17-debian-12-r3
|
||||
### 3.5.17-debian-12-r4
|
||||
|
||||
* Drop support for non-Helm cluster deployment. Upgrading of any kind including increasing replica count must also be done with `helm upgrade` exclusively. CD automation tools that respect Helm hooks such as ArgoCD can also be used.
|
||||
* Remove `prestop.sh` script. Hence, container should no longer define lifecycle prestop hook.
|
||||
|
||||
@@ -13,7 +13,6 @@ services:
|
||||
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd1:2379
|
||||
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
|
||||
- ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
|
||||
- ETCD_INITIAL_CLUSTER_STATE=new
|
||||
etcd2:
|
||||
image: docker.io/bitnami/etcd:3.5
|
||||
environment:
|
||||
@@ -25,7 +24,6 @@ services:
|
||||
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd2:2379
|
||||
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
|
||||
- ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
|
||||
- ETCD_INITIAL_CLUSTER_STATE=new
|
||||
etcd3:
|
||||
image: docker.io/bitnami/etcd:3.5
|
||||
environment:
|
||||
@@ -37,4 +35,3 @@ services:
|
||||
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd3:2379
|
||||
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
|
||||
- ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
|
||||
- ETCD_INITIAL_CLUSTER_STATE=new
|
||||
|
||||
Reference in New Issue
Block a user