request

package
v0.24.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 9 Imported by: 52

Documentation

Overview

Package request creates admissionReview request based on admission attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAdmissionObjects added in v0.16.4

func CreateAdmissionObjects(versionedAttributes *generic.VersionedAttributes, invocation *generic.WebhookInvocation) (uid types.UID, request, response runtime.Object, err error)

CreateAdmissionObjects returns the unique request uid, the AdmissionReview object to send the webhook and to decode the response into, or an error if the webhook does not support receiving any of the admission review versions we know to send

func CreateV1AdmissionReview added in v0.16.4

func CreateV1AdmissionReview(uid types.UID, versionedAttributes *generic.VersionedAttributes, invocation *generic.WebhookInvocation) *admissionv1.AdmissionReview

CreateV1AdmissionReview creates an AdmissionReview for the provided admission.Attributes

func CreateV1beta1AdmissionReview added in v0.16.4

func CreateV1beta1AdmissionReview(uid types.UID, versionedAttributes *generic.VersionedAttributes, invocation *generic.WebhookInvocation) *admissionv1beta1.AdmissionReview

CreateV1beta1AdmissionReview creates an AdmissionReview for the provided admission.Attributes

Types

type AdmissionResponse added in v0.16.4

type AdmissionResponse struct {
	AuditAnnotations map[string]string
	Allowed          bool
	Patch            []byte
	PatchType        admissionv1.PatchType
	Result           *metav1.Status
	Warnings         []string
}

AdmissionResponse contains the fields extracted from an AdmissionReview response

func VerifyAdmissionResponse added in v0.16.4

func VerifyAdmissionResponse(uid types.UID, mutating bool, review runtime.Object) (*AdmissionResponse, error)

VerifyAdmissionResponse checks the validity of the provided admission review object, and returns the audit annotations, whether the response allowed the request, any provided patch/patchType/status, or an error if the provided admission review was not valid.

Jump to

Keyboard shortcuts

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