Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ec3b2c44
Commit
ec3b2c44
authored
Dec 06, 2016
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix logic in loopback client creation
parent
527d502b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
config_selfclient.go
pkg/genericapiserver/config_selfclient.go
+8
-4
No files found.
pkg/genericapiserver/config_selfclient.go
View file @
ec3b2c44
...
...
@@ -31,13 +31,17 @@ import (
// NewSelfClientConfig returns a clientconfig which can be used to talk to this apiserver.
func
NewSelfClientConfig
(
secureServingInfo
*
SecureServingInfo
,
insecureServingInfo
*
ServingInfo
,
token
string
)
(
*
restclient
.
Config
,
error
)
{
if
cfg
,
err
:=
secureServingInfo
.
NewSelfClientConfig
(
token
);
err
!=
nil
||
cfg
!=
nil
{
cfg
,
err
:=
secureServingInfo
.
NewSelfClientConfig
(
token
)
if
cfg
!=
nil
&&
err
==
nil
{
return
cfg
,
nil
}
if
err
!=
nil
{
if
insecureServingInfo
==
nil
{
// be fatal if insecure port is not available
return
cfg
,
err
}
else
{
glog
.
Warningf
(
"Failed to create secure local client, falling back to insecure local connection: %v"
,
err
)
return
nil
,
err
}
glog
.
Warningf
(
"Failed to create secure local client, falling back to insecure local connection: %v"
,
err
)
}
if
cfg
,
err
:=
insecureServingInfo
.
NewSelfClientConfig
(
token
);
err
!=
nil
||
cfg
!=
nil
{
return
cfg
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment