common

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

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

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

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