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
6569551f
Commit
6569551f
authored
Oct 08, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return master.Config from CreateServerChain
parent
a5b87330
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
server.go
cmd/kube-apiserver/app/server.go
+7
-7
No files found.
cmd/kube-apiserver/app/server.go
View file @
6569551f
...
@@ -132,7 +132,7 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro
...
@@ -132,7 +132,7 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro
// To help debugging, immediately log version
// To help debugging, immediately log version
glog
.
Infof
(
"Version: %+v"
,
version
.
Get
())
glog
.
Infof
(
"Version: %+v"
,
version
.
Get
())
server
,
err
:=
CreateServerChain
(
completeOptions
,
stopCh
)
_
,
server
,
err
:=
CreateServerChain
(
completeOptions
,
stopCh
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -141,26 +141,26 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro
...
@@ -141,26 +141,26 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro
}
}
// CreateServerChain creates the apiservers connected via delegation.
// CreateServerChain creates the apiservers connected via delegation.
func
CreateServerChain
(
completedOptions
completedServerRunOptions
,
stopCh
<-
chan
struct
{})
(
*
genericapiserver
.
GenericAPIServer
,
error
)
{
func
CreateServerChain
(
completedOptions
completedServerRunOptions
,
stopCh
<-
chan
struct
{})
(
*
master
.
Config
,
*
genericapiserver
.
GenericAPIServer
,
error
)
{
kubeAPIServerConfig
,
_
,
pluginInitializer
,
admissionPostStartHook
,
err
:=
CreateKubeAPIServerConfig
(
completedOptions
)
kubeAPIServerConfig
,
_
,
pluginInitializer
,
admissionPostStartHook
,
err
:=
CreateKubeAPIServerConfig
(
completedOptions
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
nil
,
err
}
}
// If additional API servers are added, they should be gated.
// If additional API servers are added, they should be gated.
apiExtensionsConfig
,
err
:=
createAPIExtensionsConfig
(
*
kubeAPIServerConfig
.
GenericConfig
,
kubeAPIServerConfig
.
ExtraConfig
.
VersionedInformers
,
pluginInitializer
,
completedOptions
.
ServerRunOptions
,
completedOptions
.
MasterCount
)
apiExtensionsConfig
,
err
:=
createAPIExtensionsConfig
(
*
kubeAPIServerConfig
.
GenericConfig
,
kubeAPIServerConfig
.
ExtraConfig
.
VersionedInformers
,
pluginInitializer
,
completedOptions
.
ServerRunOptions
,
completedOptions
.
MasterCount
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
nil
,
err
}
}
apiExtensionsServer
,
err
:=
createAPIExtensionsServer
(
apiExtensionsConfig
,
genericapiserver
.
NewEmptyDelegate
())
apiExtensionsServer
,
err
:=
createAPIExtensionsServer
(
apiExtensionsConfig
,
genericapiserver
.
NewEmptyDelegate
())
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
nil
,
err
}
}
kubeAPIServer
,
err
:=
CreateKubeAPIServer
(
kubeAPIServerConfig
,
apiExtensionsServer
.
GenericAPIServer
,
admissionPostStartHook
)
kubeAPIServer
,
err
:=
CreateKubeAPIServer
(
kubeAPIServerConfig
,
apiExtensionsServer
.
GenericAPIServer
,
admissionPostStartHook
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
nil
,
err
}
}
apiExtensionsServer
.
GenericAPIServer
.
DiscoveryGroupManager
=
kubeAPIServer
.
GenericAPIServer
.
DiscoveryGroupManager
apiExtensionsServer
.
GenericAPIServer
.
DiscoveryGroupManager
=
kubeAPIServer
.
GenericAPIServer
.
DiscoveryGroupManager
...
@@ -168,7 +168,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan
...
@@ -168,7 +168,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan
// This will wire up openapi for extension api server
// This will wire up openapi for extension api server
apiExtensionsServer
.
GenericAPIServer
.
PrepareRun
()
apiExtensionsServer
.
GenericAPIServer
.
PrepareRun
()
return
kubeAPIServer
.
GenericAPIServer
,
nil
return
kubeAPIServer
Config
,
kubeAPIServer
.
GenericAPIServer
,
nil
}
}
// CreateKubeAPIServer creates and wires a workable kube-apiserver
// CreateKubeAPIServer creates and wires a workable kube-apiserver
...
...
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