k8sadmisssion

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidationPath      = "/validation"
	SkipValidationKey   = "gateway.solo.io/skip_validation"
	SkipValidationValue = "true"
)
View Source
const (
	ApplicationJson = "application/json"
	ApplicationYaml = "application/x-yaml"
)

Variables

View Source
var (
	UnmarshalErr        = errors.New(unmarshalErrMsg)
	WrappedUnmarshalErr = func(err error) error {
		return errors.Wrapf(err, unmarshalErrMsg)
	}
	ListGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "",
		Kind:    "List",
	}
)

Functions

func NewCertificateProvider added in v1.8.0

func NewCertificateProvider(certPath, keyPath string, logger *log.Logger, ctx context.Context, interval time.Duration) (*certificateProvider, error)

func NewGatewayValidatingWebhook

func NewGatewayValidatingWebhook(cfg WebhookConfig) (*http.Server, error)

func NewGatewayValidationHandler

func NewGatewayValidationHandler(ctx context.Context, validator validation.Validator, watchNamespaces []string, alwaysAccept bool, readGatewaysFromAllNamespaces bool, webhookNamespace string) *gatewayValidationWebhook

Types

type AdmissionRequestWithProxies added in v1.5.2

type AdmissionRequestWithProxies struct {
	v1beta1.AdmissionReview
	ReturnProxies bool `json:"returnProxies,omitempty"`
}

type AdmissionResponseWithProxies added in v1.4.7

type AdmissionResponseWithProxies struct {
	*v1beta1.AdmissionResponse
	Proxies []*gloov1.Proxy `json:"proxies,omitempty"`
}

Validation webhook works properly even if extra fields are provided in the response

type AdmissionReviewWithProxies added in v1.4.7

type AdmissionReviewWithProxies struct {
	AdmissionRequestWithProxies
	AdmissionResponseWithProxies
}

type WebhookConfig

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

func NewWebhookConfig

func NewWebhookConfig(ctx context.Context, validator validation.Validator, watchNamespaces []string, port int, serverCertPath, serverKeyPath string, alwaysAccept, readGatewaysFromAllNamespaces bool, webhookNamespace string) WebhookConfig

Jump to

Keyboard shortcuts

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