Documentation ¶
Overview ¶
*
- Admission mutation handler utility.
Index ¶
Constants ¶
View Source
const (
ENV_BASE_PATH = "BASE_PATH"
)
Query base path
Variables ¶
View Source
var (
UniversalDeserializer = serializer.NewCodecFactory(runtime.NewScheme()).UniversalDeserializer()
)
Functions ¶
func AdmitFuncHandler ¶
admitFuncHandler takes an admitFunc and wraps it into a http.Handler by means of calling serveAdmitFunc.
Types ¶
type AdmitFunc ¶
type AdmitFunc func(*v1beta1.AdmissionRequest) ([]PatchOperation, error)
admitFunc is a callback for admission controller logic. Given an AdmissionRequest, it returns the sequence of patch operations to be applied in case of success, or the error that will be shown when the operation is rejected.
type PatchOperation ¶
type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }
patchOperation is an operation of a JSON patch, see https://tools.ietf.org/html/rfc6902 .
Click to show internal directories.
Click to hide internal directories.