Documentation ¶
Overview ¶
Package usage contains the Handler for the usage webhook.
Index ¶
Constants ¶
View Source
const ( // InUseIndexKey used to index CRDs by "Kind" and "group", to be used when // indexing and retrieving needed CRDs InUseIndexKey = "inuse.apiversion.kind.name" // AnnotationKeyDeletionAttempt is the annotation key used to record whether // a deletion attempt was made and blocked by the Usage. The value stored is // the propagation policy used with the deletion attempt. AnnotationKeyDeletionAttempt = "usage.crossplane.io/deletion-attempt-with-policy" )
Variables ¶
This section is empty.
Functions ¶
func IndexValueForObject ¶
func IndexValueForObject(u *unstructured.Unstructured) string
IndexValueForObject returns the index value for the given object.
func SetupWebhookWithManager ¶
func SetupWebhookWithManager(mgr ctrl.Manager, options controller.Options) error
SetupWebhookWithManager sets up the webhook with the manager.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the admission Handler for Composition.
func NewHandler ¶
func NewHandler(client client.Client, opts ...HandlerOption) *Handler
NewHandler returns a new Handler.
type HandlerOption ¶
type HandlerOption func(*Handler)
HandlerOption is used to configure the Handler.
func WithLogger ¶
func WithLogger(l logging.Logger) HandlerOption
WithLogger configures the logger for the Handler.
Click to show internal directories.
Click to hide internal directories.