mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
fix npe when running in limited config in generic-control-plane mode
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
Reference in New Issue
Block a user