mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
wait until a token shows up to start addons
This commit is contained in:
parent
7ad50cf02c
commit
dcd91666b9
@ -134,6 +134,15 @@ for k,v in yaml.load(sys.stdin).iteritems():
|
||||
''' < "${kube_env_yaml}")
|
||||
fi
|
||||
|
||||
# Wait for the default service account
|
||||
token_found=""
|
||||
while [ -z "${token_made}" ]; do
|
||||
sleep .5
|
||||
token_found=$(${KUBECTL} get serviceaccount default -o template -t "{{with index .secrets 0}}{{.name}}{{end}}" || echo "")
|
||||
done
|
||||
|
||||
echo "default service account has token ${token_found}"
|
||||
|
||||
# Generate secrets for "internal service accounts".
|
||||
# TODO(etune): move to a completely yaml/object based
|
||||
# workflow so that service accounts can be created
|
||||
|
Loading…
Reference in New Issue
Block a user