report

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//	resource labels
	LabelResourceHash = "audit.kyverno.io/resource.hash"
	LabelResourceUid  = "audit.kyverno.io/resource.uid"
	//	policy labels
	LabelDomainClusterPolicy = "cpol.kyverno.io"
	LabelDomainPolicy        = "pol.kyverno.io"
	LabelPrefixClusterPolicy = LabelDomainClusterPolicy + "/"
	LabelPrefixPolicy        = LabelDomainPolicy + "/"
	//	aggregated admission report label
	LabelAggregatedReport = "audit.kyverno.io/report.aggregate"
)

Variables

This section is empty.

Functions

func BuildAdmissionReport added in v1.8.3

func CalculateResourceHash

func CalculateResourceHash(resource unstructured.Unstructured) string

func CompareHash

func CompareHash(report metav1.Object, hash string) bool

func DeleteReport

func DeleteReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) error

func GetResourceHash

func GetResourceHash(report metav1.Object) string

func GetResourceUid

func GetResourceUid(report metav1.Object) types.UID

func IsGvkSupported added in v1.8.1

func IsGvkSupported(gvk schema.GroupVersionKind) bool

func IsPolicyLabel

func IsPolicyLabel(label string) bool

func NewAdmissionReport

func NewAdmissionReport(namespace, name, owner string, uid types.UID, gvk metav1.GroupVersionKind) kyvernov1alpha2.ReportInterface

func NewBackgroundScanReport

func NewBackgroundScanReport(namespace, name string, gvk schema.GroupVersionKind, owner string, uid types.UID) kyvernov1alpha2.ReportInterface

func NewPolicyReport

func NewPolicyReport(namespace, name string, results ...policyreportv1alpha2.PolicyReportResult) kyvernov1alpha2.ReportInterface

func PolicyLabel

func PolicyLabel(policy kyvernov1.PolicyInterface) string

func PolicyLabelDomain

func PolicyLabelDomain(policy kyvernov1.PolicyInterface) string

func PolicyLabelPrefix

func PolicyLabelPrefix(policy kyvernov1.PolicyInterface) string

func PolicyNameFromLabel

func PolicyNameFromLabel(namespace, label string) (string, error)

func SelectorPolicyDoesNotExist

func SelectorPolicyDoesNotExist(policy kyvernov1.PolicyInterface) (labels.Selector, error)

func SelectorPolicyExists

func SelectorPolicyExists(policy kyvernov1.PolicyInterface) (labels.Selector, error)

func SelectorPolicyNotEquals

func SelectorPolicyNotEquals(policy kyvernov1.PolicyInterface) (labels.Selector, error)

func SelectorResourceUidEquals

func SelectorResourceUidEquals(uid types.UID) (labels.Selector, error)

func SetManagedByKyvernoLabel

func SetManagedByKyvernoLabel(obj metav1.Object)

func SetPolicyLabel

func SetPolicyLabel(report kyvernov1alpha2.ReportInterface, policy kyvernov1.PolicyInterface)

func SetResourceLabels

func SetResourceLabels(report kyvernov1alpha2.ReportInterface, uid types.UID)

func SetResourceVersionLabels

func SetResourceVersionLabels(report kyvernov1alpha2.ReportInterface, resource *unstructured.Unstructured)

func SetResponses

func SetResponses(report kyvernov1alpha2.ReportInterface, engineResponses ...*response.EngineResponse)

func SortReportResults

func SortReportResults(results []policyreportv1alpha2.PolicyReportResult)

Types

This section is empty.

Jump to

Keyboard shortcuts

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