Documentation ¶
Index ¶
- Variables
- func GenerateLabelsSet(policyKey string, trigger Object) pkglabels.Set
- func GetResource(client dclient.Interface, urSpec kyvernov1beta1.UpdateRequestSpec, ...) (*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 *kyvernov1beta1.UpdateRequest, ...) (*engine.PolicyContext, bool, error)
- func Update(client versioned.Interface, ...) (*kyvernov1beta1.UpdateRequest, error)
- func UpdateStatus(client versioned.Interface, ...) (*kyvernov1beta1.UpdateRequest, error)
- type Object
- type StatusControlInterface
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 kyvernov1beta1.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 *kyvernov1beta1.UpdateRequest, policy kyvernov1.PolicyInterface, trigger *unstructured.Unstructured, cfg config.Configuration, namespaceLabels map[string]string, logger logr.Logger, ) (*engine.PolicyContext, bool, error)
func Update ¶
func Update(client versioned.Interface, urLister kyvernov1beta1listers.UpdateRequestNamespaceLister, name string, mutator func(*kyvernov1beta1.UpdateRequest)) (*kyvernov1beta1.UpdateRequest, error)
func UpdateStatus ¶
func UpdateStatus(client versioned.Interface, urLister kyvernov1beta1listers.UpdateRequestNamespaceLister, name string, state kyvernov1beta1.UpdateRequestState, message string, genResources []kyvernov1.ResourceSpec) (*kyvernov1beta1.UpdateRequest, error)
Types ¶
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 versioned.Interface, urLister kyvernov1beta1listers.UpdateRequestNamespaceLister) StatusControlInterface
Click to show internal directories.
Click to hide internal directories.