mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 15:10:15 +08:00
Minor improvements
This commit is contained in:
@@ -56,7 +56,7 @@ To connect to your etcd server from outside the cluster execute the following co
|
||||
{{ if .Values.auth.rbac.enabled }}
|
||||
* As rbac is enabled you should add the flag `-u root:$ETCD_ROOT_PASSWORD` to the etcdctl commands. Export the password with this command:
|
||||
|
||||
export ETCD_ROOT_PASSWORD=${kubectl get secret --namespace {{ .Release.Namespace }} {{ template "etcd.fullname" . }} -o jsonpath="{.data.etcd-root-password}" | base64 --decode)}
|
||||
export ETCD_ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "etcd.fullname" . }} -o jsonpath="{.data.etcd-root-password}" | base64 --decode)
|
||||
|
||||
{{ end }}
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
|
||||
@@ -112,6 +112,7 @@ spec:
|
||||
## Setting up new cluster
|
||||
else
|
||||
echo "==> There is no data at all. Creating new cluster"
|
||||
export ETCDCTL_ENDPOINTS="{{ $etcdClientProtocol }}://{{ $etcdFullname }}-0.{{ $etcdHeadlessServiceName }}.default.svc.cluster.local:{{ $clientPort }}"
|
||||
|
||||
store_member_id &
|
||||
|
||||
@@ -120,9 +121,9 @@ spec:
|
||||
etcd > /dev/null 2>&1 &
|
||||
ETCD_PID=$!
|
||||
sleep 5
|
||||
echo "$ETCD_ROOT_PASSWORD" | etcdctl user add root
|
||||
etcdctl auth enable
|
||||
etcdctl -u root:"$ETCD_ROOT_PASSWORD" role revoke guest -path '/*' --readwrite
|
||||
echo "$ETCD_ROOT_PASSWORD" | ${AUTH_OPTIONS} etcdctl user add root
|
||||
etcdctl ${AUTH_OPTIONS} auth enable
|
||||
etcdctl ${AUTH_OPTIONS} role revoke guest -path '/*' --readwrite
|
||||
kill $ETCD_PID
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user