Documentation
¶
Overview ¶
Package admission implements gRPC-based admission plugins. An admission plugin delegates the admit/deny decision to an external service via gRPC. This allows admission logic to be implemented in a separate process using any language supported by protobuf.
The gRPC service definition is in plugin/admission/proto.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCPlugin ¶
NewGRPCPlugin creates an admission controller that communicates with an external gRPC admission service at the given address.
The name is used only for log identification. The addr should be a gRPC target string (e.g. "127.0.0.1:9000"). Additional plugin options (TLS, token, retry) can be passed via opts.
If the connection fails, the plugin logs the error and operates in fail-open mode: all admission requests return true.
func NewHTTPPlugin ¶
NewHTTPPlugin creates an admission controller that communicates with an external HTTP admission service at the given URL.
The name is used only for log identification. On each Admit call, a JSON-encoded httpPluginRequest is POSTed to the URL. A 200 response with {"ok": true} admits the address; any other response denies it.
If the HTTP client is nil, all admission requests return false.
Types ¶
This section is empty.