dnsinjector

package
v0.0.0-...-65cd678 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PolicyAnnotation annotation name for dns policy.
	PolicyAnnotation = "dns-injector.ydkn.io/policy"

	// ConfigAnnotation annotation name for dns config.
	ConfigAnnotation = "dns-injector.ydkn.io/configmap"

	// ConfigMapDNSConfigKeyJSON data key for dnsConfig in JSON format.
	ConfigMapDNSConfigKeyJSON = "dnsConfig.json"

	// ConfigMapDNSConfigKeyYAML data key for dnsConfig in YAML format.
	ConfigMapDNSConfigKeyYAML = "dnsConfig.yaml"
)

Variables

View Source
var ErrorConfigNotExists = fmt.Errorf("config does not exist: ")

ErrorConfigNotExists referenced config could not be found.

Functions

This section is empty.

Types

type Handler

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

Handler handle DNS injector webhook requests.

func NewHandler

func NewHandler(config HandlerConfig) (*Handler, error)

NewHandler creates a new Handler with given configuration.

func (*Handler) Mutate

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

Mutate handler for mutate webhook.

type HandlerConfig

type HandlerConfig struct {
	Logger *zap.SugaredLogger
}

HandlerConfig configuration for a DNS injector handler.

Jump to

Keyboard shortcuts

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