Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 1b6e547

Browse files
committed
fix: Wait for SA token to be populated
Although normally very fast, generation of the SA token is async so poll the SA token until it exists.
1 parent c186056 commit 1b6e547

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/kubefedctl/join.go

+4
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,10 @@ func populateSecretInHostCluster(clusterClientset, hostClientset kubeclient.Inte
904904
return false, nil
905905
}
906906

907+
if _, ok := joiningClusterSASecret.Data[ctlutil.TokenKey]; !ok {
908+
return false, nil
909+
}
910+
907911
secret = joiningClusterSASecret
908912

909913
return true, nil

0 commit comments

Comments
 (0)