webhook

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// default values
	DefaultContainerName       = "envoy-sidecar"
	DefaultImage               = "envoyproxy/envoy:v1.14.1"
	DefaultBootstrapConfigMap  = "envoy-sidecar-bootstrap"
	DefaultConfigVolume        = "envoy-sidecar-bootstrap"
	DefaultTLSVolume           = "envoy-sidecar-tls"
	DefaultClientCertificate   = "envoy-sidecar-client-cert"
	DefaultEnvoyExtraArgs      = ""
	DefaultEnvoyConfigBasePath = "/etc/envoy/bootstrap"
	DefaultEnvoyConfigFileName = "config.json"
	DefaultEnvoyTLSBasePath    = "/etc/envoy/tls/client"

	TlsCertificateSdsSecretFileName = "tls_certificate_sds_secret.yaml"
)
View Source
const (
	MutatePath string = "/mutate"
)

Variables

This section is empty.

Functions

func AdmitFuncHandler

func AdmitFuncHandler(admit admitFunc) http.Handler

AdmitFuncHandler takes an admitFunc and wraps it into a http.Handler by means of calling serveAdmitFunc.

Types

type PatchOperation

type PatchOperation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value,omitempty"`
}

PatchOperation represents a JSON patch, see https://tools.ietf.org/html/rfc6902 .

func MutatePod

func MutatePod(req *admissionv1.AdmissionRequest) ([]PatchOperation, error)

MutatePod returns the PatchOperation required to inject the envoy sidecar container and its volumes in the pod

type WebhookServer added in v0.4.1

type WebhookServer struct {
	// contains filtered or unexported fields
}

func NewWebhookServer added in v0.4.1

func NewWebhookServer(ctx context.Context, port int32, tlsConfig *tls.Config) *WebhookServer

NewWebhookServer creates a new WebhookServer object fron the given params

func (*WebhookServer) Start added in v0.4.1

func (ws *WebhookServer) Start(stopCh <-chan struct{}) error

Start runs the mutating admission controller in a goroutine and waits forever until the stopper signal is sent.

Jump to

Keyboard shortcuts

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