func convertAdmissionResponseToV1()

in admission-controller/convert.go [65:79]


func convertAdmissionResponseToV1(r *v1beta1.AdmissionResponse) *v1.AdmissionResponse {
	var pt *v1.PatchType
	if r.PatchType != nil {
		t := v1.PatchType(*r.PatchType)
		pt = &t
	}
	return &v1.AdmissionResponse{
		UID:              r.UID,
		Allowed:          r.Allowed,
		AuditAnnotations: r.AuditAnnotations,
		Patch:            r.Patch,
		PatchType:        pt,
		Result:           r.Result,
	}
}