func GetProxyContainerPath(spec corev1.PodSpec) string
GetProxyContainerPath gets the proxy container jsonpath of a pod relative to spec; this path is required in webhooks because of how patches are created.
func Launch( ctx context.Context, apiresources []k8s.APIResource, handler Handler, component, metricsAddr string, addr string, kubeconfig string, enablePprof bool, )
Launch sets up and starts the webhook and metrics servers
Handler is the signature for the functions that ultimately deal with the admission request
type Handler func( context.Context, *k8s.MetadataAPI, *admissionv1beta1.AdmissionRequest, record.EventRecorder, ) (*admissionv1beta1.AdmissionResponse, error)
Server describes the https server implementing the webhook
type Server struct { *http.Server // contains filtered or unexported fields }
func NewServer( ctx context.Context, api *pkgk8s.KubernetesAPI, metadataAPI *k8s.MetadataAPI, addr, certPath string, handler Handler, component string, ) (*Server, error)
NewServer returns a new instance of Server
func (s *Server) Shutdown(ctx context.Context) error
Shutdown initiates a graceful shutdown of the underlying HTTP server.
func (s *Server) Start()
Start starts the https server