Documentation ¶
Index ¶
Constants ¶
const ( //Skip : failed to process rule, will not update the resource Skip ResourceMode = "SKIP" //Create : create a new resource Create = "CREATE" //Update : update/overwrite the new resource Update = "UPDATE" )
Variables ¶
This section is empty.
Functions ¶
func ValidateResourceWithPattern ¶ added in v1.3.5
ValidateResourceWithPattern is a start of element-by-element validation process It assumes that validation is started from root, so "/" is passed Anchors are not expected in the pattern
Types ¶
type ConfigNotFound ¶
type ConfigNotFound struct {
// contains filtered or unexported fields
}
ConfigNotFound stores the config information
func NewConfigNotFound ¶
func NewConfigNotFound(config interface{}, kind, namespace, name string) *ConfigNotFound
NewConfigNotFound returns a new NewConfigNotFound error
func (*ConfigNotFound) Error ¶
func (e *ConfigNotFound) Error() string
type Controller ¶
Controller manages the life-cycle for Generate-Requests and applies generate rule
func NewController ¶
func NewController( kyvernoClient *kyvernoclient.Clientset, client *dclient.Client, policyInformer kyvernoinformer.ClusterPolicyInformer, grInformer kyvernoinformer.GenerateRequestInformer, eventGen event.Interface, dynamicInformer dynamicinformer.DynamicSharedInformerFactory, policyStatus policystatus.Listener, log logr.Logger, dynamicConfig config.Interface, resourceCache resourcecache.ResourceCache, ) (*Controller, error)
NewController returns an instance of the Generate-Request Controller
func (*Controller) EnqueueGenerateRequestFromWebhook ¶ added in v1.3.0
func (c *Controller) EnqueueGenerateRequestFromWebhook(gr *kyverno.GenerateRequest)
EnqueueGenerateRequestFromWebhook - enqueueing generate requests from webhook
type Handler ¶ added in v1.3.5
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶ added in v1.3.5
type NotFound ¶
type NotFound struct {
// contains filtered or unexported fields
}
NotFound stores the resource that was not found
func NewNotFound ¶
NewNotFound returns a new NotFound error
type ParseFailed ¶
type ParseFailed struct {
// contains filtered or unexported fields
}
ParseFailed stores the resource that failed to parse
func NewParseFailed ¶
func NewParseFailed(spec interface{}, err error) *ParseFailed
NewParseFailed returns a new ParseFailed error
func (*ParseFailed) Error ¶
func (e *ParseFailed) Error() string
type ResourceMode ¶ added in v1.2.0
type ResourceMode string
ResourceMode defines the mode for generated resource
type StatusControl ¶
type StatusControl struct {
// contains filtered or unexported fields
}
StatusControl is default implementaation of GRStatusControlInterface
func (StatusControl) Failed ¶
func (sc StatusControl) Failed(gr kyverno.GenerateRequest, message string, genResources []kyverno.ResourceSpec) error
Failed sets gr status.state to failed with message
func (StatusControl) Success ¶
func (sc StatusControl) Success(gr kyverno.GenerateRequest, genResources []kyverno.ResourceSpec) error
Success sets the gr status.state to completed and clears message
type StatusControlInterface ¶
type StatusControlInterface interface { Failed(gr kyverno.GenerateRequest, message string, genResources []kyverno.ResourceSpec) error Success(gr kyverno.GenerateRequest, genResources []kyverno.ResourceSpec) error }
StatusControlInterface provides interface to update status subresource
type Violation ¶
type Violation struct {
// contains filtered or unexported fields
}
Violation stores the rule that violated
func NewViolation ¶
NewViolation returns a new Violation error