Skip to content

@nogoo9/no-crd / index / evaluatePermissions

Function: evaluatePermissions()

evaluatePermissions(k8sContext, namespace, mode, forceRefresh?): Promise<PermissionReport>

Defined in: src/k8s/permissions.ts:119

Evaluates the required permissions for all registered MCP tools and constructs a PermissionReport. Under "namespaced" mode, some checks (such as namespace listing) are adjusted/bypassed. Uses caching to optimize startup and requests unless forceRefresh is enabled.

Parameters

k8sContext

K8sContext

Active K8sContext containing API clients.

namespace

string

The default namespace parameter.

mode

string

The active mode (cluster or namespaced).

forceRefresh?

boolean = false

Force reloading permissions even if cached report exists.

Returns

Promise<PermissionReport>

Structured PermissionReport containing permitted verbs and enabled/disabled lists.