webhooks

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(manager ctrl.Manager, apiTypes ...runtime.Object) error

Configure configures the webhook for the added CR types

func Validate

func Validate(gvk schema.GroupVersionKind, name string, validatorFuncs ...func(list *ErrorList)) error

Validate is a helper function to validate a CR with a error list object to aggregate the error and return the invalid error or nil depending if the validator func added at least one error to the passed error list object

Types

type ErrorList

type ErrorList struct {
	// contains filtered or unexported fields
}

ErrorList is a wrapper of field.Error to enable convenient error adding

func (*ErrorList) Add

func (e *ErrorList) Add(err *field.Error)

Add adds the specified error the error list array

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL