Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HandlerName is the name of this webhook handler. HandlerName = "crd-deletion-protection" // WebhookPath is the HTTP handler path for this webhook handler. WebhookPath = "/webhooks/validate-crd-deletion" )
Variables ¶
View Source
var ObjectSelector = map[string]string{gardenerutils.DeletionProtected: "true"}
ObjectSelector is the object selector for CustomResourceDefinitions used by this admission controller.
Functions ¶
func ExtractRequestObject ¶
func ExtractRequestObject(ctx context.Context, reader client.Reader, decoder *admission.Decoder, request admission.Request, listOp client.ListOption) (runtime.Object, error)
ExtractRequestObject extracts the object in the admission request and returns it. The given `ListOption` is used to list affected objects in case of a `DELETECOLLECTION` request.
Types ¶
type Handler ¶
Handler validating DELETE requests for extension CRDs and extension resources, that are marked for deletion protection (`gardener.cloud/deletion-protected`).
func (*Handler) AddToManager ¶
AddToManager adds Handler to the given manager.
Click to show internal directories.
Click to hide internal directories.