Merge pull request #127544 from mjudeikis/mjudeikis/npe.check.fix

Fix npe when running in limited config in generic-control-plane mode
This commit is contained in:
Kubernetes Prow Robot 2024-09-22 22:30:05 +01:00 committed by GitHub
commit fd44b5bf3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,6 +85,10 @@ func NewBuiltInAuthorizationOptions() *BuiltInAuthorizationOptions {
// Complete modifies authorization options
func (o *BuiltInAuthorizationOptions) Complete() []error {
if o == nil {
return nil
}
if len(o.AuthorizationConfigurationFile) == 0 && len(o.Modes) == 0 {
o.Modes = []string{authzmodes.ModeAlwaysAllow}
}