Documentation ¶
Index ¶
- func CreateAllowResponse(uid typesv1.UID) *admissionv1.AdmissionResponse
- func CreateFailResponse(uid typesv1.UID, msg string) *admissionv1.AdmissionResponse
- func DoRequest(ctx context.Context, delegate Delegate, request *admissionv1.AdmissionRequest) *admissionv1.AdmissionResponse
- func GetHookName(ctx context.Context, prefix string, uid typesv1.UID, req *http.Request) (string, *admissionv1.AdmissionResponse)
- type Delegate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAllowResponse ¶
func CreateAllowResponse(uid typesv1.UID) *admissionv1.AdmissionResponse
func CreateFailResponse ¶
func CreateFailResponse(uid typesv1.UID, msg string) *admissionv1.AdmissionResponse
func DoRequest ¶
func DoRequest(ctx context.Context, delegate Delegate, request *admissionv1.AdmissionRequest) *admissionv1.AdmissionResponse
DoRequest will make the call to the real webhook. body is closed.
func GetHookName ¶
func GetHookName(ctx context.Context, prefix string, uid typesv1.UID, req *http.Request) (string, *admissionv1.AdmissionResponse)
GetHookName takes in an HTTP request and parses out the targeted webhook or an Error if it can't be found.
Types ¶
type Delegate ¶
Delegate normalizes the URL/Service endpoint as well as any necessary CACerts.
func WebhookClientConfigToURLAndCert ¶
func WebhookClientConfigToURLAndCert(wcc v1.WebhookClientConfig) (*Delegate, error)
WebhookClientConfigToURL normalizes WebhookClientConfig into URL in a string representation.
Click to show internal directories.
Click to hide internal directories.