Skip to content

Commit fd44b5b

Browse files
authored
Merge pull request kubernetes#127544 from mjudeikis/mjudeikis/npe.check.fix
Fix npe when running in limited config in generic-control-plane mode
2 parents 5f0b2a8 + 4783af9 commit fd44b5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/kubeapiserver/options/authorization.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ func NewBuiltInAuthorizationOptions() *BuiltInAuthorizationOptions {
8585

8686
// Complete modifies authorization options
8787
func (o *BuiltInAuthorizationOptions) Complete() []error {
88+
if o == nil {
89+
return nil
90+
}
91+
8892
if len(o.AuthorizationConfigurationFile) == 0 && len(o.Modes) == 0 {
8993
o.Modes = []string{authzmodes.ModeAlwaysAllow}
9094
}

0 commit comments

Comments
 (0)