mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
Client should validate the incoming host value
Convert host:port and URLs passed to client.New() into the proper values, and return an error if the value is invalid. Change CLI to return an error if -master is invalid. Remove Client.rawRequest which was not in use, and fix the involved tests. Add NewOrDie Preserves the behavior of the client to not auth when a non-https URL is passed (although in the future this should be corrected).
This commit is contained in:
@@ -104,7 +104,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||
}
|
||||
}
|
||||
|
||||
cl := client.New(apiServer.URL, nil)
|
||||
cl := client.NewOrDie(apiServer.URL, nil)
|
||||
cl.PollPeriod = time.Second * 1
|
||||
cl.Sync = true
|
||||
|
||||
@@ -301,7 +301,7 @@ func main() {
|
||||
// Wait for the synchronization threads to come up.
|
||||
time.Sleep(time.Second * 10)
|
||||
|
||||
kubeClient := client.New(apiServerURL, nil)
|
||||
kubeClient := client.NewOrDie(apiServerURL, nil)
|
||||
|
||||
// Run tests in parallel
|
||||
testFuncs := []testFunc{
|
||||
|
Reference in New Issue
Block a user