Documentation ¶
Overview ¶
Package admission handles kubernetes admissions, it takes admission requests and returns admission reviews; for example, to mutate or validate pods
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolvePod ¶
func ResolvePod(a MutationRequest) (*corev1.Pod, error)
ResolvePod extracts a pod from an admission request
Types ¶
type MutationRequest ¶
type MutationRequest struct { Logger *logrus.Entry IsDebugLevel bool Request *admissionv1.AdmissionRequest DefaultImage string DefaultGitUsername string DefaultGitToken string Client kubernetes.Interface }
MutationRequest is a container for admission logic
func (MutationRequest) CreatePodPatch ¶
func (a MutationRequest) CreatePodPatch(pod *corev1.Pod, params appContext.Parameters) ([]byte, error)
CreatePodPatch returns a json patch containing all the mutations needed for a given pod
func (MutationRequest) ProcessAdmissionRequest ¶
func (a MutationRequest) ProcessAdmissionRequest() (*admissionv1.AdmissionReview, error)
ProcessAdmissionRequest takes an admission request and mutates the pod within, it returns an admission review with mutations as a json patch (if any)
Click to show internal directories.
Click to hide internal directories.