common

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateLabelsSet

func GenerateLabelsSet(policyKey string, trigger Object) pkglabels.Set

func ManageLabels

func ManageLabels(unstr *unstructured.Unstructured, triggerResource unstructured.Unstructured)

func MutateLabelsSet

func MutateLabelsSet(policyKey string, trigger Object) pkglabels.Set

func NewBackgroundContext

func NewBackgroundContext(dclient dclient.Interface, ur *kyvernov1beta1.UpdateRequest,
	policy kyvernov1.PolicyInterface,
	trigger *unstructured.Unstructured,
	cfg config.Configuration,
	informerCacheResolvers resolvers.ConfigmapResolver,
	namespaceLabels map[string]string,
	logger logr.Logger,
) (*engine.PolicyContext, bool, error)

Types

type Object

type Object interface {
	GetName() string
	GetNamespace() string
	GetKind() string
	GetAPIVersion() 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

Jump to

Keyboard shortcuts

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