mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
wait until a token shows up to start addons
(cherry picked from commit dcd91666b9
)
This commit is contained in:
parent
c1faae2c30
commit
8cd68b6629
@ -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_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".
|
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user