mirror of
https://github.com/rancher/rke.git
synced 2025-04-27 19:25:44 +00:00
Sprintf consistency when handling API URL
This commit is contained in:
parent
9873b5f57a
commit
3ac2ef216d
@ -120,7 +120,7 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c
|
||||
return APIURL, caCrt, clientCert, clientKey, nil, err
|
||||
}
|
||||
if len(kubeCluster.ControlPlaneHosts) > 0 {
|
||||
APIURL = fmt.Sprintf("https://%v:%v", kubeCluster.ControlPlaneHosts[0].Address, "6443")
|
||||
APIURL = fmt.Sprintf("https://%s:6443", kubeCluster.ControlPlaneHosts[0].Address)
|
||||
}
|
||||
clientCert = string(cert.EncodeCertPEM(kubeCluster.Certificates[pki.KubeAdminCertName].Certificate))
|
||||
clientKey = string(cert.EncodePrivateKeyPEM(kubeCluster.Certificates[pki.KubeAdminCertName].Key))
|
||||
@ -138,7 +138,7 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c
|
||||
}
|
||||
// update APIURL after reconcile
|
||||
if len(kubeCluster.ControlPlaneHosts) > 0 {
|
||||
APIURL = fmt.Sprintf("https://%v:%v", kubeCluster.ControlPlaneHosts[0].Address, "6443")
|
||||
APIURL = fmt.Sprintf("https://%s:6443", kubeCluster.ControlPlaneHosts[0].Address)
|
||||
}
|
||||
|
||||
if err := kubeCluster.PrePullK8sImages(ctx); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user