apiserver: k8s.io/apiserver/pkg/admission/plugin/webhook/request Index | Files

package request

import "k8s.io/apiserver/pkg/admission/plugin/webhook/request"

Package request creates admissionReview request based on admission attributes.


Package Files

admissionreview.go doc.go

func CreateAdmissionObjects Uses

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 Uses

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

CreateV1AdmissionReview creates an AdmissionReview for the provided admission.Attributes

func CreateV1beta1AdmissionReview Uses

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

CreateV1beta1AdmissionReview creates an AdmissionReview for the provided admission.Attributes

type AdmissionResponse Uses

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

AdmissionResponse contains the fields extracted from an AdmissionReview response

func VerifyAdmissionResponse Uses

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.

Package request imports 9 packages (graph) and is imported by 2 packages. Updated 2019-10-14. Refresh now. Tools for package owners.