mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 18:11:22 +00:00
Fixes lint errors in kubeapiserver packages
Fixes lint errors in kubeapiserver/admission, kubeapiserver/authorizer, kubeapiserver/authenticator. Also enables lint testing of these directories. Fixed go format. Fixed changes from config.
This commit is contained in:
@@ -19,14 +19,21 @@ package modes
|
||||
import "k8s.io/apimachinery/pkg/util/sets"
|
||||
|
||||
const (
|
||||
// ModeAlwaysAllow is the mode to set all requests as authorized
|
||||
ModeAlwaysAllow string = "AlwaysAllow"
|
||||
ModeAlwaysDeny string = "AlwaysDeny"
|
||||
ModeABAC string = "ABAC"
|
||||
ModeWebhook string = "Webhook"
|
||||
ModeRBAC string = "RBAC"
|
||||
ModeNode string = "Node"
|
||||
// ModeAlwaysDeny is the mode to set no requests as authorized
|
||||
ModeAlwaysDeny string = "AlwaysDeny"
|
||||
// ModeABAC is the mode to use Attribute Based Access Control to authorize
|
||||
ModeABAC string = "ABAC"
|
||||
// ModeWebhook is the mode to make an external webhook call to authorize
|
||||
ModeWebhook string = "Webhook"
|
||||
// ModeRBAC is the mode to use Role Based Access Control to authorize
|
||||
ModeRBAC string = "RBAC"
|
||||
// ModeNode is an authorization mode that authorizes API requests made by kubelets.
|
||||
ModeNode string = "Node"
|
||||
)
|
||||
|
||||
// AuthorizationModeChoices is the list of supported authorization modes
|
||||
var AuthorizationModeChoices = []string{ModeAlwaysAllow, ModeAlwaysDeny, ModeABAC, ModeWebhook, ModeRBAC, ModeNode}
|
||||
|
||||
// IsValidAuthorizationMode returns true if the given authorization mode is a valid one for the apiserver
|
||||
|
Reference in New Issue
Block a user