webhook

package
v0.2.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 11

Documentation

Overview

Package webhook contains libraries for generating webhookconfig manifests from markers in Go source files.

The markers take the form:

+kubebuilder:webhook:failurePolicy=<string>,groups=<[]string>,resources=<[]string>,verbs=<[]string>,versions=<[]string>,name=<string>,path=<string>,mutating=<bool>

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigDefinition s a marker for defining Webhook manifests.
	// Call ToWebhook on the value to get a Kubernetes Webhook.
	ConfigDefinition = markers.Must(markers.MakeDefinition("kubebuilder:webhook", markers.DescribesPackage, Config{}))
)

Functions

This section is empty.

Types

type Config added in v0.2.0

type Config struct {
	Mutating      bool
	FailurePolicy string

	Groups    []string
	Resources []string
	Verbs     []string
	Versions  []string

	Name string
	Path string
}

Config is a marker value that describes a kubernetes Webhook config.

func (Config) ToWebhook added in v0.2.0

func (c Config) ToWebhook() admissionreg.Webhook

ToRule converts this rule to its Kubernetes API form.

type Generator added in v0.2.0

type Generator struct{}

Generator is a genall.Generator that generates Webhook manifests.

func (Generator) Generate added in v0.2.0

func (Generator) Generate(ctx *genall.GenerationContext) error

func (Generator) RegisterMarkers added in v0.2.0

func (Generator) RegisterMarkers(into *markers.Registry) error

Jump to

Keyboard shortcuts

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