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.
Click to show internal directories.
Click to hide internal directories.