Documentation
¶
Overview ¶
Package logic features the main business logic: it forwards a containerd request to a Kubernetes admission controller.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvalLogic ¶
type EvalLogic[IN, OUT any] struct { // Upstream should send the gRPC method to real upstream (containerd) Upstream func(ctx context.Context, in IN, opts ...grpc.CallOption) (OUT, error) // TransformInput should transform the incoming containerd gRPC request into what Kubernetes // expects. TransformInput func(s common.ProxyServer, in IN) (any, error) PatchInput func(s common.ProxyServer, in IN, modifiedObjectBytes []byte) error ProxyServer common.ProxyServer }
EvalLogic is the type that encapsulates dependencies needed to delegate the authorization decision to k8s admission controllers
func (EvalLogic[IN, OUT]) CallAdmissionControllers ¶
CallAdmissionControllers is the main logic that takes a gRPC *Request message, repackages it into a K8s AdmissionReview request, forwards it to the configured validating/mutating webhooks. If the decision allows it, it is forwarded to the upstream containerd server and the *Response gRPC response is returned.
Click to show internal directories.
Click to hide internal directories.