webhookconfigcache

package
v3.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookConfigCache

type WebhookConfigCache struct {
	// contains filtered or unexported fields
}

WebhookConfigCache maintains the current state of webhook configurations.

func NewWebhookConfigCache

func NewWebhookConfigCache() *WebhookConfigCache

NewWebhookConfigCache creates a new webhook config cache.

func (*WebhookConfigCache) GetConfig

func (w *WebhookConfigCache) GetConfig(webhookName string) (WebhookMatchingConfig, bool)

GetConfig retrieves the current webhook configuration from cache.

func (*WebhookConfigCache) RemoveConfig

func (w *WebhookConfigCache) RemoveConfig(webhookName string)

RemoveConfig removes a webhook config from cache.

func (*WebhookConfigCache) UpsertConfig

func (w *WebhookConfigCache) UpsertConfig(webhookName string, newConfig WebhookMatchingConfig) bool

UpsertConfig updates the cached config and returns whether it changed.

type WebhookMatchingConfig

type WebhookMatchingConfig struct {
	NamespaceSelector *metav1.LabelSelector                        `json:"namespaceSelector,omitempty"`
	ObjectSelector    *metav1.LabelSelector                        `json:"objectSelector,omitempty"`
	Rules             []admissionregistrationv1.RuleWithOperations `json:"rules,omitempty"`
	MatchPolicy       *admissionregistrationv1.MatchPolicyType     `json:"matchPolicy,omitempty"`
	MatchConditions   []admissionregistrationv1.MatchCondition     `json:"matchConditions,omitempty"`
}

WebhookMatchingConfig represents the fields that affect resource matching in a webhook.

Jump to

Keyboard shortcuts

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