mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
fix npe when running in limited config in generic-control-plane mode
This commit is contained in:
parent
61dbc03563
commit
4783af9a49
@ -85,6 +85,10 @@ func NewBuiltInAuthorizationOptions() *BuiltInAuthorizationOptions {
|
|||||||
|
|
||||||
// Complete modifies authorization options
|
// Complete modifies authorization options
|
||||||
func (o *BuiltInAuthorizationOptions) Complete() []error {
|
func (o *BuiltInAuthorizationOptions) Complete() []error {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if len(o.AuthorizationConfigurationFile) == 0 && len(o.Modes) == 0 {
|
if len(o.AuthorizationConfigurationFile) == 0 && len(o.Modes) == 0 {
|
||||||
o.Modes = []string{authzmodes.ModeAlwaysAllow}
|
o.Modes = []string{authzmodes.ModeAlwaysAllow}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user