admission

package
v0.0.0-...-1bdd90c Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewValidator

func NewValidator(informer configurationinformer.SharedInformerFactory) *validator

NewValidator returns new validator with manba factory

Types

type ManbaValidator

type ManbaValidator interface {
	ValidateManbaIngress(*configurationv1beta1.ManbaIngress) (bool, string, error)
}

ManbaValidator validates Manba entities.

type Server

type Server struct {
	Validator ManbaValidator
	// contains filtered or unexported fields
}

Server is an HTTP server that can validate ManbaIngress Controllers' Custom Resources using Kubernetes Admission Webhooks.

func New

func New(restConfig *rest.Config, listen, certDir string, validator ManbaValidator) (s *Server, err error)

New returns a new server

func (*Server) Handle

Handle parses AdmissionReview requests and responds back with the validation result of the entity.

func (*Server) Start

func (s *Server) Start(stopCh <-chan struct{}) error

Start starts all registered Controllers and blocks until the Stop channel is closed. Returns an error if there is an error starting any controller.

Jump to

Keyboard shortcuts

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