mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-22 01:56:16 +00:00
Wait for service accounts in the kube-system namesapce
This commit is contained in:
parent
a267e04e54
commit
90e105521c
@ -141,16 +141,17 @@ for k,v in yaml.load(sys.stdin).iteritems():
|
|||||||
''' < "${kube_env_yaml}")
|
''' < "${kube_env_yaml}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait for the default service account
|
# Create the namespace that will be used to host the cluster-level add-ons.
|
||||||
|
start_addon /etc/kubernetes/addons/namespace.yaml 100 10 "" &
|
||||||
|
|
||||||
|
# Wait for the default service account to be created in the kube-system namespace.
|
||||||
token_found=""
|
token_found=""
|
||||||
while [ -z "${token_found}" ]; do
|
while [ -z "${token_found}" ]; do
|
||||||
sleep .5
|
sleep .5
|
||||||
token_found=$(${KUBECTL} get serviceaccount default -o template -t "{{with index .secrets 0}}{{.name}}{{end}}" || true)
|
token_found=$(${KUBECTL} get --namespace="${SYSTEM_NAMESPACE}" serviceaccount default -o template -t "{{with index .secrets 0}}{{.name}}{{end}}" || true)
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "== default service account has token ${token_found} =="
|
echo "== default service account in the ${SYSTEM_NAMESPACE} namespace has token ${token_found} =="
|
||||||
|
|
||||||
start_addon /etc/kubernetes/addons/namespace.yaml 100 10 "" &
|
|
||||||
|
|
||||||
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user