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
b00d1960
Commit
b00d1960
authored
Jul 18, 2017
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose RegisterAllAdmissionPlugins so that admission chains can be built reused
parent
6b78eeca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
plugins.go
cmd/kube-apiserver/app/plugins.go
+2
-2
server.go
cmd/kube-apiserver/app/server.go
+1
-1
plugins.go
federation/cmd/federation-apiserver/app/plugins.go
+2
-2
server.go
federation/cmd/federation-apiserver/app/server.go
+1
-1
No files found.
cmd/kube-apiserver/app/plugins.go
View file @
b00d1960
...
@@ -51,8 +51,8 @@ import (
...
@@ -51,8 +51,8 @@ import (
"k8s.io/kubernetes/plugin/pkg/admission/webhook"
"k8s.io/kubernetes/plugin/pkg/admission/webhook"
)
)
//
r
egisterAllAdmissionPlugins registers all admission plugins
//
R
egisterAllAdmissionPlugins registers all admission plugins
func
r
egisterAllAdmissionPlugins
(
plugins
*
admission
.
Plugins
)
{
func
R
egisterAllAdmissionPlugins
(
plugins
*
admission
.
Plugins
)
{
admit
.
Register
(
plugins
)
admit
.
Register
(
plugins
)
alwayspullimages
.
Register
(
plugins
)
alwayspullimages
.
Register
(
plugins
)
antiaffinity
.
Register
(
plugins
)
antiaffinity
.
Register
(
plugins
)
...
...
cmd/kube-apiserver/app/server.go
View file @
b00d1960
...
@@ -247,7 +247,7 @@ func CreateNodeDialer(s *options.ServerRunOptions) (tunneler.Tunneler, *http.Tra
...
@@ -247,7 +247,7 @@ func CreateNodeDialer(s *options.ServerRunOptions) (tunneler.Tunneler, *http.Tra
// CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them
// CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them
func
CreateKubeAPIServerConfig
(
s
*
options
.
ServerRunOptions
,
nodeTunneler
tunneler
.
Tunneler
,
proxyTransport
http
.
RoundTripper
)
(
*
master
.
Config
,
informers
.
SharedInformerFactory
,
clientgoinformers
.
SharedInformerFactory
,
*
kubeserver
.
InsecureServingInfo
,
aggregatorapiserver
.
ServiceResolver
,
error
)
{
func
CreateKubeAPIServerConfig
(
s
*
options
.
ServerRunOptions
,
nodeTunneler
tunneler
.
Tunneler
,
proxyTransport
http
.
RoundTripper
)
(
*
master
.
Config
,
informers
.
SharedInformerFactory
,
clientgoinformers
.
SharedInformerFactory
,
*
kubeserver
.
InsecureServingInfo
,
aggregatorapiserver
.
ServiceResolver
,
error
)
{
// register all admission plugins
// register all admission plugins
r
egisterAllAdmissionPlugins
(
s
.
Admission
.
Plugins
)
R
egisterAllAdmissionPlugins
(
s
.
Admission
.
Plugins
)
// set defaults in the options before trying to create the generic config
// set defaults in the options before trying to create the generic config
if
err
:=
defaultOptions
(
s
);
err
!=
nil
{
if
err
:=
defaultOptions
(
s
);
err
!=
nil
{
...
...
federation/cmd/federation-apiserver/app/plugins.go
View file @
b00d1960
...
@@ -32,8 +32,8 @@ import (
...
@@ -32,8 +32,8 @@ import (
"k8s.io/kubernetes/plugin/pkg/admission/initialization"
"k8s.io/kubernetes/plugin/pkg/admission/initialization"
)
)
//
r
egisterAllAdmissionPlugins registers all admission plugins
//
R
egisterAllAdmissionPlugins registers all admission plugins
func
r
egisterAllAdmissionPlugins
(
plugins
*
admission
.
Plugins
)
{
func
R
egisterAllAdmissionPlugins
(
plugins
*
admission
.
Plugins
)
{
admit
.
Register
(
plugins
)
admit
.
Register
(
plugins
)
deny
.
Register
(
plugins
)
deny
.
Register
(
plugins
)
gc
.
Register
(
plugins
)
gc
.
Register
(
plugins
)
...
...
federation/cmd/federation-apiserver/app/server.go
View file @
b00d1960
...
@@ -87,7 +87,7 @@ func Run(s *options.ServerRunOptions, stopCh <-chan struct{}) error {
...
@@ -87,7 +87,7 @@ func Run(s *options.ServerRunOptions, stopCh <-chan struct{}) error {
// stop with the given channel.
// stop with the given channel.
func
NonBlockingRun
(
s
*
options
.
ServerRunOptions
,
stopCh
<-
chan
struct
{})
error
{
func
NonBlockingRun
(
s
*
options
.
ServerRunOptions
,
stopCh
<-
chan
struct
{})
error
{
// register all admission plugins
// register all admission plugins
r
egisterAllAdmissionPlugins
(
s
.
Admission
.
Plugins
)
R
egisterAllAdmissionPlugins
(
s
.
Admission
.
Plugins
)
// set defaults
// set defaults
if
err
:=
s
.
GenericServerRunOptions
.
DefaultAdvertiseAddress
(
s
.
SecureServing
);
err
!=
nil
{
if
err
:=
s
.
GenericServerRunOptions
.
DefaultAdvertiseAddress
(
s
.
SecureServing
);
err
!=
nil
{
...
...
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