Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registration ¶
type Registration struct { Name string `mapstructure:"name" yaml:"name"` Targets []Target `mapstructure:"targets" yaml:"targets"` NamespaceSelector string `mapstructure:"namespace-selector" yaml:"namespace-selector,omitempty"` FailurePolicy string `mapstructure:"failure-policy" yaml:"failure-policy"` }
type Server ¶
type Server struct { CompanyDomain string Namespace string Service string CACert []byte // contains filtered or unexported fields }
func NewServer ¶
NewServer creates a new webhook server and sets up the initial graffiti handler. Use AddGraffitiRule to load the rules into the webhook server before starting.
func (Server) AddGraffitiRule ¶
AddGraffitiRule provides a way of adding new rules into the http mux and corresponding handler context map
func (Server) RegisterHook ¶
func (s Server) RegisterHook(r Registration, clientset *kubernetes.Clientset) error
RegisterHook registers our webhook as MutatingWebhook with the kubernetes api.
func (Server) StartWebhookServer ¶
StartWebhookServer starts the webhook server with TLS encryption
type Target ¶
type Target struct { APIGroups []string `mapstructure:"api-groups" yaml:"api-groups"` APIVersions []string `mapstructure:"api-versions" yaml:"api-versions"` Resources []string `mapstructure:"resources" yaml:"resources"` }
Target defines a kubernetes compatible admissionreg.Rule but with mapstructure tags so that we can unmarshal it as part of a Viper structured configuration.
Click to show internal directories.
Click to hide internal directories.