Documentation ¶
Index ¶
- Variables
- func GenerateLabelsSet(policyKey string, trigger Object) pkglabels.Set
- func GetResource(client dclient.Interface, urSpec urkyverno.UpdateRequestSpec, log logr.Logger) (*unstructured.Unstructured, error)
- func ManageLabels(unstr *unstructured.Unstructured, triggerResource unstructured.Unstructured)
- func MutateLabelsSet(policyKey string, trigger Object) pkglabels.Set
- func NewBackgroundContext(dclient dclient.Interface, ur *urkyverno.UpdateRequest, ...) (*engine.PolicyContext, bool, error)
- func Update(client kyvernoclient.Interface, ...) (*kyvernov1beta1.UpdateRequest, error)
- func UpdateStatus(client kyvernoclient.Interface, ...) (*kyvernov1beta1.UpdateRequest, error)
- type ConfigNotFound
- type NotFound
- type Object
- type ParseFailed
- type StatusControlInterface
- type Violation
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRetry = wait.Backoff{ Steps: 15, Duration: 100 * time.Millisecond, Factor: 1.0, Jitter: 0.1, }
Functions ¶
func GetResource ¶
func GetResource(client dclient.Interface, urSpec urkyverno.UpdateRequestSpec, log logr.Logger) (*unstructured.Unstructured, error)
func ManageLabels ¶
func ManageLabels(unstr *unstructured.Unstructured, triggerResource unstructured.Unstructured)
func NewBackgroundContext ¶
func NewBackgroundContext(dclient dclient.Interface, ur *urkyverno.UpdateRequest, policy kyverno.PolicyInterface, trigger *unstructured.Unstructured, cfg config.Configuration, namespaceLabels map[string]string, logger logr.Logger) (*engine.PolicyContext, bool, error)
func Update ¶
func Update(client kyvernoclient.Interface, urLister kyvernov1beta1listers.UpdateRequestNamespaceLister, name string, mutator func(*kyvernov1beta1.UpdateRequest)) (*kyvernov1beta1.UpdateRequest, error)
func UpdateStatus ¶
func UpdateStatus(client kyvernoclient.Interface, urLister kyvernov1beta1listers.UpdateRequestNamespaceLister, name string, state kyvernov1beta1.UpdateRequestState, message string, genResources []kyvernov1.ResourceSpec) (*kyvernov1beta1.UpdateRequest, error)
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 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 StatusControlInterface ¶
type StatusControlInterface interface { Failed(name string, message string, genResources []kyvernov1.ResourceSpec) (*kyvernov1beta1.UpdateRequest, error) Success(name string, genResources []kyvernov1.ResourceSpec) (*kyvernov1beta1.UpdateRequest, error) Skip(name string, genResources []kyvernov1.ResourceSpec) (*kyvernov1beta1.UpdateRequest, error) }
StatusControlInterface provides interface to update status subresource
func NewStatusControl ¶
func NewStatusControl(client kyvernoclient.Interface, urLister kyvernov1beta1listers.UpdateRequestNamespaceLister) StatusControlInterface
type Violation ¶
type Violation struct {
// contains filtered or unexported fields
}
Violation stores the rule that violated
func NewViolation ¶
NewViolation returns a new Violation error
Click to show internal directories.
Click to hide internal directories.