Documentation ¶
Overview ¶
Package request creates admissionReview request based on admission attributes.
Index ¶
- func CreateAdmissionObjects(versionedAttributes *admission.VersionedAttributes, ...) (uid types.UID, request, response runtime.Object, err error)
- func CreateV1AdmissionReview(uid types.UID, versionedAttributes *admission.VersionedAttributes, ...) *admissionv1.AdmissionReview
- func CreateV1beta1AdmissionReview(uid types.UID, versionedAttributes *admission.VersionedAttributes, ...) *admissionv1beta1.AdmissionReview
- type AdmissionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAdmissionObjects ¶ added in v0.16.4
func CreateAdmissionObjects(versionedAttributes *admission.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 *admission.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 *admission.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.