diff --git a/clusterctl/clusterdeployer/clusterclient.go b/clusterctl/clusterdeployer/clusterclient.go index b34e9895b20d..08dd37f9e746 100644 --- a/clusterctl/clusterdeployer/clusterclient.go +++ b/clusterctl/clusterdeployer/clusterclient.go @@ -35,9 +35,9 @@ const ( ApiServerPort = 443 RetryIntervalKubectlApply = 5 * time.Second RetryIntervalResourceReady = 5 * time.Second - TimeoutKubectlApply = 2 * time.Minute - TimeoutResourceReady = 2 * time.Minute - TimeoutMachineReady = 5 * time.Minute + TimeoutKubectlApply = 5 * time.Minute + TimeoutResourceReady = 5 * time.Minute + TimeoutMachineReady = 10 * time.Minute ) type clusterClient struct { diff --git a/clusterctl/clusterdeployer/clusterdeployer.go b/clusterctl/clusterdeployer/clusterdeployer.go index 73e28b24f323..5b67631a07d6 100644 --- a/clusterctl/clusterdeployer/clusterdeployer.go +++ b/clusterctl/clusterdeployer/clusterdeployer.go @@ -300,7 +300,7 @@ func (d *ClusterDeployer) writeKubeconfig(kubeconfig string) error { func waitForKubeconfigReady(provider ProviderDeployer, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) { kubeconfig := "" - err := util.Poll(500*time.Millisecond, 120*time.Second, func() (bool, error) { + err := util.Poll(5*time.Second, 10*time.Minute, func() (bool, error) { glog.V(2).Infof("Waiting for kubeconfig on %v to become ready...", machine.Name) k, err := provider.GetKubeConfig(cluster, machine) if err != nil { diff --git a/clusterctl/examples/vsphere/generate-yaml.sh b/clusterctl/examples/vsphere/generate-yaml.sh index 3db5e198ee4a..a5a99df45b04 100755 --- a/clusterctl/examples/vsphere/generate-yaml.sh +++ b/clusterctl/examples/vsphere/generate-yaml.sh @@ -45,13 +45,14 @@ if [ $OVERWRITE -ne 1 ] && [ -f $PROVIDERCOMPONENT_GENERATED_FILE ]; then fi # Check if the ssh key already exists. If not, generate and copy to the .ssh dir. -if [ ! -f $MACHINE_CONTROLLER_SSH_PRIVATE_FILE ]; then +if [ ! -f $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE ]; then echo "Generating SSH key files for machine controller." - ssh-keygen -t rsa -f $MACHINE_CONTROLLER_SSH_PRIVATE_FILE -N "" + # This is needed because GetKubeConfig assumes the key in the home .ssh dir. + ssh-keygen -t rsa -f $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE -N "" fi -MACHINE_CONTROLLER_SSH_PUBLIC=$(cat $MACHINE_CONTROLLER_SSH_PUBLIC_FILE|base64) -MACHINE_CONTROLLER_SSH_PRIVATE=$(cat $MACHINE_CONTROLLER_SSH_PRIVATE_FILE|base64) +MACHINE_CONTROLLER_SSH_PUBLIC=$(cat $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PUBLIC_FILE|base64) +MACHINE_CONTROLLER_SSH_PRIVATE=$(cat $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE|base64) cat $PROVIDERCOMPONENT_TEMPLATE_FILE \ | sed -e "s/\$MACHINE_CONTROLLER_SSH_PUBLIC/$MACHINE_CONTROLLER_SSH_PUBLIC/" \