mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
Merge pull request #10542 from zmerlynn/redo_10520
Wait until a token shows up to start addons (redux)
This commit is contained in:
commit
102a8a1e36
@ -134,6 +134,15 @@ for k,v in yaml.load(sys.stdin).iteritems():
|
|||||||
''' < "${kube_env_yaml}")
|
''' < "${kube_env_yaml}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Wait for the default service account
|
||||||
|
token_found=""
|
||||||
|
while [ -z "${token_found}" ]; do
|
||||||
|
sleep .5
|
||||||
|
token_found=$(${KUBECTL} get serviceaccount default -o template -t "{{with index .secrets 0}}{{.name}}{{end}}" || true)
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "== default service account has token ${token_found} =="
|
||||||
|
|
||||||
# Generate secrets for "internal service accounts".
|
# Generate secrets for "internal service accounts".
|
||||||
# TODO(etune): move to a completely yaml/object based
|
# TODO(etune): move to a completely yaml/object based
|
||||||
# workflow so that service accounts can be created
|
# workflow so that service accounts can be created
|
||||||
@ -171,6 +180,3 @@ while true; do
|
|||||||
`dirname $0`/kube-addon-update.sh /etc/kubernetes/addons
|
`dirname $0`/kube-addon-update.sh /etc/kubernetes/addons
|
||||||
sleep $ADDON_CHECK_INTERVAL_SEC
|
sleep $ADDON_CHECK_INTERVAL_SEC
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user