Documentation ¶
Overview ¶
Package namespace defines the utilities that are used by the webhook plugin to decide if a webhook should be applied to an object based on its namespace.
Index ¶
- type Matcher
- func (m *Matcher) GetNamespace(name string) (*v1.Namespace, error)
- func (m *Matcher) GetNamespaceLabels(attr admission.Attributes) (map[string]string, error)
- func (m *Matcher) MatchNamespaceSelector(p NamespaceSelectorProvider, attr admission.Attributes) (bool, *apierrors.StatusError)
- func (m *Matcher) Validate() error
- type NamespaceSelectorProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher struct { NamespaceLister corelisters.NamespaceLister Client clientset.Interface }
Matcher decides if a request is exempted by the NamespaceSelector of a webhook configuration.
func (*Matcher) GetNamespace ¶ added in v0.28.0
func (*Matcher) GetNamespaceLabels ¶
GetNamespaceLabels gets the labels of the namespace related to the attr.
func (*Matcher) MatchNamespaceSelector ¶
func (m *Matcher) MatchNamespaceSelector(p NamespaceSelectorProvider, attr admission.Attributes) (bool, *apierrors.StatusError)
MatchNamespaceSelector decideds whether the request matches the namespaceSelctor of the webhook. Only when they match, the webhook is called.
Click to show internal directories.
Click to hide internal directories.