Skip to content

Commit

Permalink
Don't panic is admission options is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed May 17, 2018
1 parent 3e06c24 commit 7b79ebd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions staging/src/k8s.io/apiserver/pkg/server/options/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func NewAdmissionOptions() *AdmissionOptions {

// AddFlags adds flags related to admission for a specific APIServer to the specified FlagSet
func (a *AdmissionOptions) AddFlags(fs *pflag.FlagSet) {
if a == nil {
return
}

fs.StringSliceVar(&a.EnablePlugins, "enable-admission-plugins", a.EnablePlugins, ""+
"admission plugins that should be enabled in addition to default enabled ones. "+
"Comma-delimited list of admission plugins: "+strings.Join(a.Plugins.Registered(), ", ")+". "+
Expand Down

0 comments on commit 7b79ebd

Please sign in to comment.