Documentation ¶
Index ¶
- func NewAdmissionController(ctx context.Context, name, path string, ...) *controller.Impl
- func NewAdmissionControllerWithConfig(ctx context.Context, name, path string, ...) *controller.Impl
- type Callback
- type OptionFunc
- func WithCallbacks(callbacks map[schema.GroupVersionKind]Callback) OptionFunc
- func WithDisallowUnknownFields() OptionFunc
- func WithPath(path string) OptionFunc
- func WithTypes(types map[schema.GroupVersionKind]resourcesemantics.GenericCRD) OptionFunc
- func WithWrapContext(f func(context.Context) context.Context) OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdmissionController ¶
func NewAdmissionController( ctx context.Context, name, path string, handlers map[schema.GroupVersionKind]resourcesemantics.GenericCRD, wc func(context.Context) context.Context, disallowUnknownFields bool, callbacks ...map[schema.GroupVersionKind]Callback, ) *controller.Impl
NewAdmissionController constructs a reconciler
func NewAdmissionControllerWithConfig ¶
func NewAdmissionControllerWithConfig( ctx context.Context, name, path string, handlers map[schema.GroupVersionKind]resourcesemantics.GenericCRD, wc func(context.Context) context.Context, disallowUnknownFields bool, callbacks map[schema.GroupVersionKind]Callback, ) *controller.Impl
NewAdmissionControllerWithConfig constructs a reconciler and registers the provided handlers with specified verbs and SubResources
Types ¶
type Callback ¶
type Callback struct {
// contains filtered or unexported fields
}
Callback is a generic function to be called by a consumer of validation
func NewCallback ¶
func NewCallback(function func(context.Context, *unstructured.Unstructured) error, supportedVerbs ...webhook.Operation) Callback
NewCallback creates a new callback function to be invoked on supported verbs.
type OptionFunc ¶
type OptionFunc func(*options)
func WithCallbacks ¶
func WithCallbacks(callbacks map[schema.GroupVersionKind]Callback) OptionFunc
func WithDisallowUnknownFields ¶
func WithDisallowUnknownFields() OptionFunc
func WithPath ¶
func WithPath(path string) OptionFunc
func WithTypes ¶
func WithTypes(types map[schema.GroupVersionKind]resourcesemantics.GenericCRD) OptionFunc
func WithWrapContext ¶
func WithWrapContext(f func(context.Context) context.Context) OptionFunc
Click to show internal directories.
Click to hide internal directories.