Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PodResource = metav1.GroupVersionResource{Version: "v1", Resource: "pods"} MutateWebhooks []MutateAdmissionWebhook UniversalDeserializer = serializer.NewCodecFactory(runtime.NewScheme()).UniversalDeserializer() )
Functions ¶
func AddToMutateHooks ¶
func AddToMutateHooks(hook MutateAdmissionWebhook)
Types ¶
type AdmissionWebhook ¶
type AdmissionWebhook interface { ResourceNeedHandle(admission.AdmissionReview) (bool, error) Name() string Init(ServerOption) }
type MutateAdmissionWebhook ¶
type MutateAdmissionWebhook interface { AdmissionWebhook // Mutate resources Mutate(admission.AdmissionReview) ([]PatchOperation, error) }
type PatchOperation ¶
type PatchOperation struct { Operation string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }
PatchOperation used for mutate webhook
type ServerOption ¶
type ServerOption struct { SchedulerName string `json:"scheduler_name"` CertDir string `json:"cert_dir"` TLSCert string `json:"tls_cert"` TLSKey string `json:"tls_key"` }
func NewServerOption ¶
func NewServerOption() *ServerOption
type ValidateAdmissionWebhook ¶
type ValidateAdmissionWebhook interface { AdmissionWebhook Validate() interface{} }
Click to show internal directories.
Click to hide internal directories.