package object
import "k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/object"
Package object defines the utilities that are used by the webhook plugin to decide if a webhook should run, as long as either the old object or the new object has labels matching the webhook config's objectSelector.
Index ¶
Types ¶
type Matcher ¶
type Matcher struct { }
Matcher decides if a request selected by the ObjectSelector.
func (*Matcher) MatchObjectSelector ¶
func (m *Matcher) MatchObjectSelector(p ObjectSelectorProvider, attr admission.Attributes) (bool, *apierrors.StatusError)
MatchObjectSelector decideds whether the request matches the ObjectSelector of the webhook. Only when they match, the webhook is called.
type ObjectSelectorProvider ¶
type ObjectSelectorProvider interface { // GetObjectSelector gets the webhook ObjectSelector field. GetParsedObjectSelector() (labels.Selector, error) }
Source Files ¶
doc.go matcher.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.