Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Handler RequestHandler
}
Handler Generic handler for Admission
func (*Handler) HandleAdmission ¶
func (handler *Handler) HandleAdmission(writer http.ResponseWriter, request *http.Request)
HandleAdmission HttpServer function to handle Admissions
func (*Handler) Process ¶
func (handler *Handler) Process(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error)
Process Handles the AdmissionRequest via the handler
type PatchOperation ¶
type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }
PatchOperation JsonPatch struct http://jsonpatch.com/
type PodAdmissionRequestHandler ¶
type PodAdmissionRequestHandler struct {
PodHandler PodPatcher
}
PodAdmissionRequestHandler PodAdmissionRequest handler
type PodPatcher ¶
type PodPatcher interface { PatchPodCreate(ctx context.Context, namespace string, pod corev1.Pod) ([]PatchOperation, error) PatchPodUpdate(ctx context.Context, namespace string, oldPod corev1.Pod, newPod corev1.Pod) ([]PatchOperation, error) PatchPodDelete(ctx context.Context, namespace string, pod corev1.Pod) ([]PatchOperation, error) }
PodPatcher Pod patching interface
type RequestHandler ¶
type RequestHandler interface {
// contains filtered or unexported methods
}
RequestHandler AdmissionRequest handler
Click to show internal directories.
Click to hide internal directories.