proxy

package
v0.0.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

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

type Delegate struct {
	Service    string
	CACertPool *x509.CertPool
}

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.

Jump to

Keyboard shortcuts

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