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
9b507e86
Commit
9b507e86
authored
Dec 16, 2016
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent negotation on connections that dont' require it
parent
faf959b5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
fake.go
pkg/kubectl/cmd/testing/fake.go
+4
-0
factory.go
pkg/kubectl/cmd/util/factory.go
+3
-0
factory_client_access.go
pkg/kubectl/cmd/util/factory_client_access.go
+4
-0
factory_object_mapping.go
pkg/kubectl/cmd/util/factory_object_mapping.go
+1
-1
No files found.
pkg/kubectl/cmd/testing/fake.go
View file @
9b507e86
...
...
@@ -230,6 +230,10 @@ func (f *FakeFactory) ClientConfig() (*restclient.Config, error) {
return
f
.
tf
.
ClientConfig
,
f
.
tf
.
Err
}
func
(
f
*
FakeFactory
)
BareClientConfig
()
(
*
restclient
.
Config
,
error
)
{
return
f
.
tf
.
ClientConfig
,
f
.
tf
.
Err
}
func
(
f
*
FakeFactory
)
ClientForMapping
(
*
meta
.
RESTMapping
)
(
resource
.
RESTClient
,
error
)
{
return
f
.
tf
.
Client
,
f
.
tf
.
Err
}
...
...
pkg/kubectl/cmd/util/factory.go
View file @
9b507e86
...
...
@@ -91,6 +91,9 @@ type ClientAccessFactory interface {
RESTClient
()
(
*
restclient
.
RESTClient
,
error
)
// Returns a client.Config for accessing the Kubernetes server.
ClientConfig
()
(
*
restclient
.
Config
,
error
)
// BareClientConfig returns a client.Config that has NOT been negotiated. It's
// just directions to the server. People use this to build RESTMappers on top of
BareClientConfig
()
(
*
restclient
.
Config
,
error
)
// TODO this should probably be removed and collapsed into whatever we want to use long term
// probably returning a restclient for a version and leaving contruction up to someone else
...
...
pkg/kubectl/cmd/util/factory_client_access.go
View file @
9b507e86
...
...
@@ -179,6 +179,10 @@ func (f *ring0Factory) ClientSetForVersion(requiredVersion *schema.GroupVersion)
func
(
f
*
ring0Factory
)
ClientConfig
()
(
*
restclient
.
Config
,
error
)
{
return
f
.
clientCache
.
ClientConfigForVersion
(
nil
)
}
func
(
f
*
ring0Factory
)
BareClientConfig
()
(
*
restclient
.
Config
,
error
)
{
return
f
.
clientConfig
.
ClientConfig
()
}
func
(
f
*
ring0Factory
)
ClientConfigForVersion
(
requiredVersion
*
schema
.
GroupVersion
)
(
*
restclient
.
Config
,
error
)
{
return
f
.
clientCache
.
ClientConfigForVersion
(
nil
)
}
...
...
pkg/kubectl/cmd/util/factory_object_mapping.go
View file @
9b507e86
...
...
@@ -135,7 +135,7 @@ func (f *ring1Factory) ClientForMapping(mapping *meta.RESTMapping) (resource.RES
}
func
(
f
*
ring1Factory
)
UnstructuredClientForMapping
(
mapping
*
meta
.
RESTMapping
)
(
resource
.
RESTClient
,
error
)
{
cfg
,
err
:=
f
.
clientAccessFactory
.
ClientConfig
()
cfg
,
err
:=
f
.
clientAccessFactory
.
Bare
ClientConfig
()
if
err
!=
nil
{
return
nil
,
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