webhook

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package webhook implements utility routines related to Kubernetes' admission webhooks.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ContentTypeJSON is the supported content type for HTTP requests
	ContentTypeJSON = "application/json"

	// HTTPHeaderContentType is the Content-Type HTTP header key
	HTTPHeaderContentType = "Content-Type"

	// Deserializer is used to decode the admission request body
	Deserializer = codecs.UniversalDeserializer()
)

Functions

func AdmissionError

func AdmissionError(err error) *admissionv1.AdmissionResponse

AdmissionError wraps error as AdmissionResponse

func GetAdmissionRequestBody

func GetAdmissionRequestBody(w http.ResponseWriter, req *http.Request) ([]byte, error)

GetAdmissionRequestBody returns the body of the admission request

Types

This section is empty.

Jump to

Keyboard shortcuts

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