Merge pull request #60838 from CaoShuFeng/amdission_controller_glog

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

log enabled admission controller in order

After switching to --enable-admission-plugins/--disable-admission-plugins, some admission controller may start silently. And these admission controllers may modify or forbid objects. This pull request does a lot of help for admin to trouble shooting.

/assign @hzxuzhonghu @sttts 

**Release note**:
```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2018-03-07 11:21:13 -08:00 committed by GitHub
commit bad8e0d91c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import (
"io/ioutil"
"reflect"
"sort"
"strings"
"sync"
"github.com/golang/glog"
@ -144,6 +145,9 @@ func (ps *Plugins) NewFromPlugins(pluginNames []string, configProvider ConfigPro
}
}
}
if len(pluginNames) != 0 {
glog.Infof("Loaded %d admission controller(s) successfully in the following order: %s.", len(pluginNames), strings.Join(pluginNames, ","))
}
return chainAdmissionHandler(handlers), nil
}