webhook

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MutatingWebhookConfigurationName = "kubernetes-faketime-injector"
	MutatingWebhookConfigurationPath = "/mutate"
)

Functions

This section is empty.

Types

type Plugins

type Plugins []string

string or array params add duck type to []string

func (*Plugins) Set

func (p *Plugins) Set(value string) error

func (*Plugins) String

func (p *Plugins) String() string

type WebHookOptions

type WebHookOptions struct {
	// TLS key and value
	TLSCertPath   string
	TLSKeyPath    string
	TLSCaCertPath string

	TLSPair tls.Certificate
	// Server Port
	Port string
	//service configuration
	ServiceName      string
	ServiceNamespace string
	// leader election option
	LeaderElection bool
	// kubeconf path
	KubeConf string
	// plugin and configuration
	Plugins Plugins
}

func NewWebHookOptions

func NewWebHookOptions() (options *WebHookOptions, err error)

NewWebHookOptions parse the command line params and initialize the server

type WebHookServer

type WebHookServer struct {
	Options *WebHookOptions
	Server  *http.Server
	// contains filtered or unexported fields
}

WebHook Server to handle patch request

func NewWebHookServer

func NewWebHookServer(wo *WebHookOptions) (ws *WebHookServer, err error)

NewWebHookServer return mutate web server

func (*WebHookServer) Run

func (ws *WebHookServer) Run() (err error)

func (*WebHookServer) Serve

func (ws *WebHookServer) Serve(w http.ResponseWriter, r *http.Request)

Http handler of patch request

Jump to

Keyboard shortcuts

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