Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdmissionError ¶
AdmissionError represents an error (rejection, serialization error, etc) from an AdmissionHandler endpoint/handler.
func (AdmissionError) Error ¶
func (e AdmissionError) Error() string
type AdmissionHandler ¶
type AdmissionHandler struct { // The AdmitFunc to invoke for this handler. AdmitFunc AdmitFunc // LimitBytes limits the size of objects the webhook will handle. LimitBytes int64 // contains filtered or unexported fields }
AdmissionHandler ...
func (*AdmissionHandler) ServeHTTP ¶
func (ah *AdmissionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type AdmitFunc ¶
type AdmitFunc func(reviewRequest *admission.AdmissionReview) (*admission.AdmissionResponse, error)
AdmitFunc is a type for building Kubernetes admission webhooks. An AdmitFunc should check whether an admission request is valid, and shall return an admission response that sets AdmissionResponse.Allowed to true or false as needed.
Users wishing to build their own admission handlers should satisfy the AdmitFunc type, and pass it to an AdmissionHandler for serving over HTTP.
Note: this mirrors the type in k8s source: https://github.com/kubernetes/kubernetes/blob/v1.13.0/test/images/webhook/main.go#L43-L44