common

package
v1.6.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Enforce blocks the request on failure
	Enforce = "enforce"
	// Audit indicates not to block the request on failure, but report failiures as policy violations
	Audit = "audit"
)

Policy Reporting Modes

View Source
const (
	PolicyViolation = "POLICYVIOLATION"
	PolicyReport    = "POLICYREPORT"
)

Policy Reporting Types

Variables

This section is empty.

Functions

func GetFormatedKind added in v1.4.3

func GetFormatedKind(str string) (kind string)

func GetKindFromGVK added in v1.3.4

func GetKindFromGVK(str string) (apiVersion string, kind string)

GetKindFromGVK - get kind and APIVersion from GVK

func GetNamespaceLabels added in v1.3.2

func GetNamespaceLabels(namespaceObj *v1.Namespace, logger logr.Logger) map[string]string

GetNamespaceLabels - from namespace obj

func GetNamespaceSelectorsFromGenericInformer added in v1.3.2

func GetNamespaceSelectorsFromGenericInformer(kind, namespaceOfResource string, nsInformer informers.GenericInformer, logger logr.Logger) map[string]string

GetNamespaceSelectorsFromGenericInformer - extracting the namespacelabels when generic informer is passed

func GetNamespaceSelectorsFromNamespaceLister added in v1.3.2

func GetNamespaceSelectorsFromNamespaceLister(kind, namespaceOfResource string, nsLister listerv1.NamespaceLister, logger logr.Logger) map[string]string

GetNamespaceSelectorsFromNamespaceLister - extract the namespacelabels when namespace lister is passed

func ProcessDeletePolicyForCloneGenerateRule added in v1.4.2

func ProcessDeletePolicyForCloneGenerateRule(rules []kyverno.Rule, client *dclient.Client, pName string, logger logr.Logger) bool

func RetryFunc added in v1.4.0

func RetryFunc(retryInterval, timeout time.Duration, run func() error, logger logr.Logger) func() error

RetryFunc allows retrying a function on error within a given timeout

func VariableToJSON added in v1.3.6

func VariableToJSON(key, value string) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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