This section is empty.


View Source
var (
	// SidecarIgnoredNamespaces specifies the namespaces where Pods won't get injected
	SidecarIgnoredNamespaces = []string{"kube-system", "kube-public"}
	// SidecarEnvKey specifies the environment variable which marks a container as injected
	SidecarEnvKey = "IS_INJECTED"
View Source
var (
	// HandlerMap contains admission webhook handlers
	HandlerMap = map[string]admission.Handler{
		"mutate-pod": &PodCreateHandler{},


func PodMatchSidecarSet

func PodMatchSidecarSet(pod *corev1.Pod, sidecarSet appsv1alpha1.SidecarSet) (bool, error)

    PodMatchSidecarSet determines if pod match Selector of sidecar.


    type PodCreateHandler

    type PodCreateHandler struct {
    	// To use the client, you need to do the following:
    	// - uncomment it
    	// - import
    	// - uncomment the InjectClient method at the bottom of this file.
    	Client client.Client
    	// Decoder decodes objects
    	Decoder *admission.Decoder

      PodCreateHandler handles Pod

      func (*PodCreateHandler) Handle

        Handle handles admission requests.

        func (*PodCreateHandler) InjectClient

        func (h *PodCreateHandler) InjectClient(c client.Client) error

          InjectClient injects the client into the PodCreateHandler

          func (*PodCreateHandler) InjectDecoder

          func (h *PodCreateHandler) InjectDecoder(d *admission.Decoder) error

            InjectDecoder injects the decoder into the PodCreateHandler