Skip to content

Commit

Permalink
[bitnami/etcd] fix: healthcheck will failed when startup etcd with on…
Browse files Browse the repository at this point in the history
…e-way tls authentication (#70554)

Signed-off-by: Chen Rao <chenrao317328@163.com>
  • Loading branch information
chenraoCR committed Aug 21, 2024
1 parent 0f285a2 commit 49c6d16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ etcdctl_auth_norbac_flags() {
authFlags+=("--cert" "${ETCD_DATA_DIR}/fixtures/client/cert.pem" "--key" "${ETCD_DATA_DIR}/fixtures/client/key.pem")
else
[[ -f "$ETCD_CERT_FILE" ]] && [[ -f "$ETCD_KEY_FILE" ]] && authFlags+=("--cert" "$ETCD_CERT_FILE" "--key" "$ETCD_KEY_FILE")
[[ -f "$ETCD_TRUSTED_CA_FILE" ]] && authFlags+=("--cacert" "$ETCD_TRUSTED_CA_FILE")
# if CA file exists, then use CA to verify server certs; otherwise, just skip server certs verification
[[ -f "$ETCD_TRUSTED_CA_FILE" ]] && authFlags+=("--cacert" "$ETCD_TRUSTED_CA_FILE") || authFlags+=("--insecure-skip-tls-verify")
fi
echo "${authFlags[*]}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ etcdctl_auth_norbac_flags() {
authFlags+=("--cert" "${ETCD_DATA_DIR}/fixtures/client/cert.pem" "--key" "${ETCD_DATA_DIR}/fixtures/client/key.pem")
else
[[ -f "$ETCD_CERT_FILE" ]] && [[ -f "$ETCD_KEY_FILE" ]] && authFlags+=("--cert" "$ETCD_CERT_FILE" "--key" "$ETCD_KEY_FILE")
[[ -f "$ETCD_TRUSTED_CA_FILE" ]] && authFlags+=("--cacert" "$ETCD_TRUSTED_CA_FILE")
# if CA file exists, then use CA to verify server certs; otherwise, just skip server certs verification
[[ -f "$ETCD_TRUSTED_CA_FILE" ]] && authFlags+=("--cacert" "$ETCD_TRUSTED_CA_FILE") || authFlags+=("--insecure-skip-tls-verify")
fi
echo "${authFlags[*]}"
}
Expand Down

0 comments on commit 49c6d16

Please sign in to comment.