Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bitnami/etcd/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: etcd
version: 4.4.13
version: 4.4.14
appVersion: 3.4.3
description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines
keywords:
Expand Down
7 changes: 7 additions & 0 deletions bitnami/etcd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ As an alternative, this chart supports using an initContainer to change the owne

You can enable this initContainer by setting `volumePermissions.enabled` to `true`.

## Notable changes

### 4.4.14

In this release we addressed a vulnerability that showed the `ETCD_ROOT_PASSWORD` environment variable in the application logs. Users are advised to update immediately. More information in [this issue](https://github.com/bitnami/charts/issues/1901).


## Upgrading

### To 3.0.0
Expand Down
9 changes: 6 additions & 3 deletions bitnami/etcd/templates/scripts-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ data:
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }}:{{ $clientPort }},{{ end }}"
# Remove the last comma "," introduced in the string
export ETCDCTL_ENDPOINTS="$(sed 's/,/ /g' <<< $ETCDCTL_ENDPOINTS | awk '{$1=$1};1' | sed 's/ /,/g')"

export ROOT_PASSWORD="${ETCD_ROOT_PASSWORD:-}"
if [[ -n "${ETCD_ROOT_PASSWORD:-}" ]]; then
unset ETCD_ROOT_PASSWORD
fi

@turkenh turkenh Feb 11, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about renaming the env var in statefulset manifest to ROOT_PASSWORD? https://github.com/bitnami/charts/blob/master/bitnami/etcd/templates/statefulset.yaml#L136

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essentially for having consistency between the expected variable names here https://github.com/bitnami/bitnami-docker-etcd and in the chart. Even if we changed it everywhere, we would need some sort of backwards compatibility

# Functions
## Store member id for later member replacement
store_member_id() {
Expand All @@ -54,12 +57,12 @@ data:
configure_rbac() {
# When there's more than one replica, we can assume the 1st member
# to be created is "{{ $etcdFullname }}-0" since a statefulset is used
if [[ -n "${ETCD_ROOT_PASSWORD:-}" ]] && [[ "$HOSTNAME" == "{{ $etcdFullname }}-0" ]]; then
if [[ -n "${ROOT_PASSWORD:-}" ]] && [[ "$HOSTNAME" == "{{ $etcdFullname }}-0" ]]; then
echo "==> Configuring RBAC authentication!" 1>&3 2>&4
etcd &
ETCD_PID=$!
while ! etcdctl $AUTH_OPTIONS member list; do sleep 1; done
echo "$ETCD_ROOT_PASSWORD" | etcdctl $AUTH_OPTIONS user add root --interactive=false
echo "$ROOT_PASSWORD" | etcdctl $AUTH_OPTIONS user add root --interactive=false
etcdctl $AUTH_OPTIONS auth enable
kill "$ETCD_PID"
sleep 5
Expand Down