add missing k8s Webhook authorization mode
This commit is contained in:
parent
f9ad1cae78
commit
1d07b0edac
@ -332,11 +332,11 @@ in {
|
|||||||
|
|
||||||
authorizationMode = mkOption {
|
authorizationMode = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Kubernetes apiserver authorization mode (AlwaysAllow/AlwaysDeny/ABAC/RBAC). See
|
Kubernetes apiserver authorization mode (AlwaysAllow/AlwaysDeny/ABAC/Webhook/RBAC/Node). See
|
||||||
<link xlink:href="https://kubernetes.io/docs/reference/access-authn-authz/authorization/"/>
|
<link xlink:href="https://kubernetes.io/docs/reference/access-authn-authz/authorization/"/>
|
||||||
'';
|
'';
|
||||||
default = ["RBAC" "Node"];
|
default = ["RBAC" "Node"];
|
||||||
type = types.listOf (types.enum ["AlwaysAllow" "AlwaysDeny" "ABAC" "RBAC" "Node"]);
|
type = types.listOf (types.enum ["AlwaysAllow" "AlwaysDeny" "ABAC" "Webhook" "RBAC" "Node"]);
|
||||||
};
|
};
|
||||||
|
|
||||||
authorizationPolicy = mkOption {
|
authorizationPolicy = mkOption {
|
||||||
@ -348,6 +348,15 @@ in {
|
|||||||
type = types.listOf types.attrs;
|
type = types.listOf types.attrs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
webhookConfig = mkOption {
|
||||||
|
description = ''
|
||||||
|
Kubernetes apiserver Webhook config file. It uses the kubeconfig file format.
|
||||||
|
See <link xlink:href="https://kubernetes.io/docs/reference/access-authn-authz/webhook/"/>
|
||||||
|
'';
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
};
|
||||||
|
|
||||||
allowPrivileged = mkOption {
|
allowPrivileged = mkOption {
|
||||||
description = "Whether to allow privileged containers on Kubernetes.";
|
description = "Whether to allow privileged containers on Kubernetes.";
|
||||||
default = true;
|
default = true;
|
||||||
@ -943,6 +952,9 @@ in {
|
|||||||
(concatMapStringsSep "\n" (l: builtins.toJSON l) cfg.apiserver.authorizationPolicy)
|
(concatMapStringsSep "\n" (l: builtins.toJSON l) cfg.apiserver.authorizationPolicy)
|
||||||
}"
|
}"
|
||||||
} \
|
} \
|
||||||
|
${optionalString (elem "Webhook" cfg.apiserver.authorizationMode)
|
||||||
|
"--authorization-webhook-config-file=${cfg.apiserver.webhookConfig}"
|
||||||
|
} \
|
||||||
--secure-port=${toString cfg.apiserver.securePort} \
|
--secure-port=${toString cfg.apiserver.securePort} \
|
||||||
--service-cluster-ip-range=${cfg.apiserver.serviceClusterIpRange} \
|
--service-cluster-ip-range=${cfg.apiserver.serviceClusterIpRange} \
|
||||||
${optionalString (cfg.apiserver.runtimeConfig != "")
|
${optionalString (cfg.apiserver.runtimeConfig != "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user