Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶ added in v1.3.0
type Monitor struct {
// contains filtered or unexported fields
}
Monitor stores the last webhook request time and monitors registered webhooks.
If a webhook is not received in the idleCheckInterval the monitor triggers a change in the Kyverno deployment to force a webhook request. If no requests are received after idleDeadline the webhooks are deleted and re-registered.
Webhook configurations are checked every tickerInterval. Currently the check only queries for the expected resource name, and does not compare other details like the webhook settings.
func NewMonitor ¶ added in v1.3.0
func NewMonitor(nsInformer informerv1.SecretInformer, log logr.Logger) *Monitor
NewMonitor returns a new instance of webhook monitor
func (*Monitor) Run ¶ added in v1.3.0
func (t *Monitor) Run(register *Register, certRenewer *tls.CertRenewer, eventGen event.Interface, stopCh <-chan struct{})
Run runs the checker and verify the resource update
type Register ¶ added in v1.3.0
type Register struct {
// contains filtered or unexported fields
}
Register manages webhook registration. There are five webhooks: 1. Policy Validation 2. Policy Mutation 3. Resource Validation 4. Resource Mutation 5. Webhook Status Mutation
func NewRegister ¶ added in v1.3.0
func NewRegister( clientConfig *rest.Config, client *client.Client, resCache resourcecache.ResourceCache, serverIP string, webhookTimeout int32, debug bool, log logr.Logger) *Register
NewRegister creates new Register instance
func (*Register) Check ¶ added in v1.3.0
Check returns an error if any of the webhooks are not configured
func (*Register) GetKubePolicyDeployment ¶ added in v1.3.5
func (wrc *Register) GetKubePolicyDeployment() (*apps.Deployment, *unstructured.Unstructured, error)
GetKubePolicyDeployment gets Kyverno deployment
func (*Register) GetWebhookTimeOut ¶ added in v1.3.0
GetWebhookTimeOut returns the value of webhook timeout