Documentation ¶
Overview ¶
Package webhook delegates admission checks to dynamically configured webhooks.
Package webhook delegates admission checks to dynamically configured webhooks.
Package webhook checks a webhook for configured operation admission ¶
Package webhook checks a webhook for configured operation admission ¶
Package webhook checks a webhook for configured operation admission
Index ¶
- Constants
- func Register(plugins *admission.Plugins)
- type AdmissionConfig
- type AuthenticationInfoResolver
- type AuthenticationInfoResolverFunc
- type AuthenticationInfoResolverWrapper
- type ErrCallingWebhook
- type GenericAdmissionWebhook
- func (a *GenericAdmissionWebhook) Admit(attr admission.Attributes) error
- func (a *GenericAdmissionWebhook) SetAuthenticationInfoResolverWrapper(wrapper AuthenticationInfoResolverWrapper)
- func (a *GenericAdmissionWebhook) SetExternalKubeClientSet(client clientset.Interface)
- func (a *GenericAdmissionWebhook) SetScheme(scheme *runtime.Scheme)
- func (a *GenericAdmissionWebhook) SetServiceResolver(sr ServiceResolver)
- func (a *GenericAdmissionWebhook) Validate() error
- type RuleMatcher
- type ServiceResolver
- type WebhookSource
Constants ¶
const (
// Name of admission plug-in
PluginName = "GenericAdmissionWebhook"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdmissionConfig ¶
type AdmissionConfig struct {
KubeConfigFile string `json:"kubeConfigFile"`
}
AdmissionConfig holds config data that is unique to each API server.
type AuthenticationInfoResolverFunc ¶
func (AuthenticationInfoResolverFunc) ClientConfigFor ¶
func (a AuthenticationInfoResolverFunc) ClientConfigFor(server string) (*rest.Config, error)
type AuthenticationInfoResolverWrapper ¶
type AuthenticationInfoResolverWrapper func(AuthenticationInfoResolver) AuthenticationInfoResolver
type ErrCallingWebhook ¶
func (*ErrCallingWebhook) Error ¶
func (e *ErrCallingWebhook) Error() string
type GenericAdmissionWebhook ¶
type GenericAdmissionWebhook struct { *admission.Handler // contains filtered or unexported fields }
GenericAdmissionWebhook is an implementation of admission.Interface.
func NewGenericAdmissionWebhook ¶
func NewGenericAdmissionWebhook(configFile io.Reader) (*GenericAdmissionWebhook, error)
NewGenericAdmissionWebhook returns a generic admission webhook plugin.
func (*GenericAdmissionWebhook) Admit ¶
func (a *GenericAdmissionWebhook) Admit(attr admission.Attributes) error
Admit makes an admission decision based on the request attributes.
func (*GenericAdmissionWebhook) SetAuthenticationInfoResolverWrapper ¶
func (a *GenericAdmissionWebhook) SetAuthenticationInfoResolverWrapper(wrapper AuthenticationInfoResolverWrapper)
TODO find a better way wire this, but keep this pull small for now.
func (*GenericAdmissionWebhook) SetExternalKubeClientSet ¶
func (a *GenericAdmissionWebhook) SetExternalKubeClientSet(client clientset.Interface)
WantsExternalKubeClientSet defines a function which sets external ClientSet for admission plugins that need it
func (*GenericAdmissionWebhook) SetScheme ¶
func (a *GenericAdmissionWebhook) SetScheme(scheme *runtime.Scheme)
SetScheme sets a serializer(NegotiatedSerializer) which is derived from the scheme
func (*GenericAdmissionWebhook) SetServiceResolver ¶
func (a *GenericAdmissionWebhook) SetServiceResolver(sr ServiceResolver)
SetServiceResolver sets a service resolver for the webhook admission plugin. Passing a nil resolver does not have an effect, instead a default one will be used.
func (*GenericAdmissionWebhook) Validate ¶
func (a *GenericAdmissionWebhook) Validate() error
Validator holds Validate functions, which are responsible for validation of initialized shared resources and should be implemented on admission plugins
type RuleMatcher ¶
type RuleMatcher struct { Rule v1alpha1.RuleWithOperations Attr admission.Attributes }
func (*RuleMatcher) Matches ¶
func (r *RuleMatcher) Matches() bool
type ServiceResolver ¶
serviceResolver knows how to convert a service reference into an actual location.
type WebhookSource ¶
type WebhookSource interface { Run(stopCh <-chan struct{}) ExternalAdmissionHooks() (*v1alpha1.ExternalAdmissionHookConfiguration, error) }
WebhookSource can list dynamic webhook plugins.