From b331fa6b61e91bef44e8d6c60eda5c3f6c4ff97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Rodr=C3=ADguez=20Hern=C3=A1ndez?= Date: Thu, 23 Jul 2020 18:49:15 +0200 Subject: [PATCH] [bitnami/etcd] Ensure ETCD_DATA_DIR permissions are set to 700 (#3196) * [bitnami/etcd] Ensure ETCD_DATA_DIR permissions are set to 700 * Move check permissions block when previous data is detected * Remove blank line * [bitnami/etcd] Update components versions Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/etcd/Chart.yaml | 4 ++-- bitnami/etcd/templates/scripts-configmap.yaml | 6 ++++++ bitnami/etcd/values-production.yaml | 2 +- bitnami/etcd/values.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bitnami/etcd/Chart.yaml b/bitnami/etcd/Chart.yaml index 41578c234..390d04d3c 100644 --- a/bitnami/etcd/Chart.yaml +++ b/bitnami/etcd/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: etcd -version: 4.8.14 -appVersion: 3.4.9 +version: 4.9.0 +appVersion: 3.4.10 description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines keywords: - etcd diff --git a/bitnami/etcd/templates/scripts-configmap.yaml b/bitnami/etcd/templates/scripts-configmap.yaml index 4933de993..29fce0c21 100644 --- a/bitnami/etcd/templates/scripts-configmap.yaml +++ b/bitnami/etcd/templates/scripts-configmap.yaml @@ -144,6 +144,12 @@ data: {{- end }} else echo "==> Detected data from previous deployments..." 1>&3 2>&4 + if [[ $(stat -c "%a" "$ETCD_DATA_DIR") != *700 ]]; then + echo "==> Setting data directory permissions to 700 in a recursive way (required in etcd >=3.4.10)" 1>&3 2>&4 + chmod -R 700 $ETCD_DATA_DIR + else + echo "==> The data directory is already configured with the proper permissions" 1>&3 2>&4 + fi if [[ {{ $replicaCount }} -eq 1 ]]; then echo "==> Single node cluster detected!!" 1>&3 2>&4 elif is_disastrous_failure; then diff --git a/bitnami/etcd/values-production.yaml b/bitnami/etcd/values-production.yaml index a81e8ada3..e81c54005 100644 --- a/bitnami/etcd/values-production.yaml +++ b/bitnami/etcd/values-production.yaml @@ -14,7 +14,7 @@ image: registry: docker.io repository: bitnami/etcd - tag: 3.4.9-debian-10-r53 + tag: 3.4.10-debian-10-r1 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images diff --git a/bitnami/etcd/values.yaml b/bitnami/etcd/values.yaml index 813799917..77ce32610 100644 --- a/bitnami/etcd/values.yaml +++ b/bitnami/etcd/values.yaml @@ -14,7 +14,7 @@ image: registry: docker.io repository: bitnami/etcd - tag: 3.4.9-debian-10-r53 + tag: 3.4.10-debian-10-r1 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images