checker

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetryCount   int           = 3
	DefaultDeadline time.Duration = 60 * time.Second
	DefaultResync   time.Duration = 60 * time.Second
)

MaxRetryCount defines the max deadline count

Variables

This section is empty.

Functions

This section is empty.

Types

type LastReqTime

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

LastReqTime stores the lastrequest times for incoming api-requests

func NewLastReqTime

func NewLastReqTime(log logr.Logger) *LastReqTime

NewLastReqTime returns a new instance of LastRequestTime store

func (*LastReqTime) Run

func (t *LastReqTime) Run(pLister kyvernolister.ClusterPolicyLister, eventGen event.Interface, client *dclient.Client, defaultResync time.Duration, deadline time.Duration, stopCh <-chan struct{})

Run runs the checker and verify the resource update

func (*LastReqTime) SetTime

func (t *LastReqTime) SetTime(tm time.Time)

SetTime updates the lastrequest time

func (*LastReqTime) Time

func (t *LastReqTime) Time() time.Time

Time returns the lastrequest time

type StatusControl

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

StatusControl controls the webhook status

func NewVerifyControl

func NewVerifyControl(client *dclient.Client, eventGen event.Interface, log logr.Logger) *StatusControl

NewVerifyControl ...

func (StatusControl) FailedStatus

func (vc StatusControl) FailedStatus() error

FailedStatus ...

func (StatusControl) IncrementAnnotation

func (vc StatusControl) IncrementAnnotation() error

IncrementAnnotation ...

func (StatusControl) SuccessStatus

func (vc StatusControl) SuccessStatus() error

SuccessStatus ...

type StatusInterface

type StatusInterface interface {
	// Increments generation counter annotation
	IncrementAnnotation() error
	// update annotation to inform webhook is active
	SuccessStatus() error
	// update annotation to inform webhook is inactive
	FailedStatus() error
}

StatusInterface provides api to update webhook active annotations on kyverno deployments

Jump to

Keyboard shortcuts

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