feat: allow specifcation of full url for endpoint

This PR moves to using the full URL for endpoint instead of trying to
hardcode 6443 in various places like we were doing.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
This commit is contained in:
Spencer Smith
2019-10-15 20:58:19 -04:00
committed by Spencer Smith
parent eb99cab416
commit d0111fe617
14 changed files with 105 additions and 37 deletions

View File

@@ -114,7 +114,7 @@ func NewTemporaryClientFromPKI(caCrt, caKey []byte, endpoint, port string) (help
return nil, fmt.Errorf("failed to create certificate from CSR: %w", err)
}
h, err := NewClientFromPKI(caCrt, crt.X509CertificatePEM, key.KeyPEM, endpoint, "6443")
h, err := NewClientFromPKI(caCrt, crt.X509CertificatePEM, key.KeyPEM, endpoint, port)
if err != nil {
return nil, fmt.Errorf("failed to create client: %w", err)
}