agent_inject

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRegisterInjectorMetrics added in v1.6.0

func MustRegisterInjectorMetrics(registry prometheus.Registerer)

Types

type Handler

type Handler struct {
	// RequireAnnotation means that the annotation must be given to inject.
	// If this is false, injection is default.
	RequireAnnotation          bool
	VaultAddress               string
	VaultCACertBytes           string
	VaultAuthType              string
	VaultAuthPath              string
	VaultNamespace             string
	ProxyAddress               string
	ImageVault                 string
	Clientset                  *kubernetes.Clientset
	Log                        hclog.Logger
	RevokeOnShutdown           bool
	UserID                     string
	GroupID                    string
	SameID                     bool
	ShareProcessNamespace      bool
	SetSecurityContext         bool
	DefaultTemplate            string
	ResourceRequestCPU         string
	ResourceRequestMem         string
	ResourceRequestEphemeral   string
	ResourceLimitCPU           string
	ResourceLimitMem           string
	ResourceLimitEphemeral     string
	ExitOnRetryFailure         bool
	StaticSecretRenderInterval string
	MaxConnectionsPerHost      int64
	AuthMinBackoff             string
	AuthMaxBackoff             string
	DisableIdleConnections     string
	DisableKeepAlives          string
}

Handler is the HTTP handler for admission webhooks.

func (*Handler) Handle

func (h *Handler) Handle(w http.ResponseWriter, r *http.Request)

Handle is the http.HandlerFunc implementation that actually handles the webhook request for admission control. This should be registered or served via an HTTP server.

func (*Handler) Mutate

Mutate takes an admission request and performs mutation if necessary, returning the final API response.

type MutateResponse added in v1.6.0

type MutateResponse struct {
	Resp            *admissionv1.AdmissionResponse
	InjectedInit    bool
	InjectedSidecar bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL