Documentation ¶
Index ¶
- Constants
- func BuildAdmissionReport(resource unstructured.Unstructured, request *admissionv1.AdmissionRequest, ...) kyvernov1alpha2.ReportInterface
- func CalculateResourceHash(resource unstructured.Unstructured) string
- func CalculateSummary(results []policyreportv1alpha2.PolicyReportResult) (summary policyreportv1alpha2.PolicyReportSummary)
- func CompareHash(report metav1.Object, hash string) bool
- func CreateReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, ...) (kyvernov1alpha2.ReportInterface, error)
- func DeepCopy(report kyvernov1alpha2.ReportInterface) kyvernov1alpha2.ReportInterface
- func DeleteReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, ...) error
- func EngineResponseToReportResults(response *response.EngineResponse) []policyreportv1alpha2.PolicyReportResult
- func GetResourceHash(report metav1.Object) string
- func GetResourceUid(report metav1.Object) types.UID
- func IsGvkSupported(gvk schema.GroupVersionKind) bool
- func IsPolicyLabel(label string) bool
- func NewAdmissionReport(namespace, name, owner string, uid types.UID, gvk metav1.GroupVersionKind) kyvernov1alpha2.ReportInterface
- func NewBackgroundScanReport(namespace, name string, gvk schema.GroupVersionKind, owner string, ...) kyvernov1alpha2.ReportInterface
- func NewPolicyReport(namespace, name string, results ...policyreportv1alpha2.PolicyReportResult) kyvernov1alpha2.ReportInterface
- func PolicyLabel(policy kyvernov1.PolicyInterface) string
- func PolicyLabelDomain(policy kyvernov1.PolicyInterface) string
- func PolicyLabelPrefix(policy kyvernov1.PolicyInterface) string
- func PolicyNameFromLabel(namespace, label string) (string, error)
- func SelectorPolicyDoesNotExist(policy kyvernov1.PolicyInterface) (labels.Selector, error)
- func SelectorPolicyExists(policy kyvernov1.PolicyInterface) (labels.Selector, error)
- func SelectorPolicyNotEquals(policy kyvernov1.PolicyInterface) (labels.Selector, error)
- func SelectorResourceUidEquals(uid types.UID) (labels.Selector, error)
- func SetManagedByKyvernoLabel(obj metav1.Object)
- func SetPolicyLabel(report kyvernov1alpha2.ReportInterface, policy kyvernov1.PolicyInterface)
- func SetResourceLabels(report kyvernov1alpha2.ReportInterface, uid types.UID)
- func SetResourceVersionLabels(report kyvernov1alpha2.ReportInterface, resource *unstructured.Unstructured)
- func SetResponses(report kyvernov1alpha2.ReportInterface, ...)
- func SetResults(report kyvernov1alpha2.ReportInterface, ...)
- func SortReportResults(results []policyreportv1alpha2.PolicyReportResult)
- func SplitResultsByPolicy(logger logr.Logger, results []policyreportv1alpha2.PolicyReportResult) map[string][]policyreportv1alpha2.PolicyReportResult
- func UpdateReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, ...) (kyvernov1alpha2.ReportInterface, error)
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 BuildAdmissionReport(resource unstructured.Unstructured, request *admissionv1.AdmissionRequest, gvk metav1.GroupVersionKind, responses ...*response.EngineResponse) kyvernov1alpha2.ReportInterface
func CalculateResourceHash ¶
func CalculateResourceHash(resource unstructured.Unstructured) string
func CalculateSummary ¶
func CalculateSummary(results []policyreportv1alpha2.PolicyReportResult) (summary policyreportv1alpha2.PolicyReportSummary)
func CreateReport ¶
func CreateReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) (kyvernov1alpha2.ReportInterface, error)
func DeepCopy ¶
func DeepCopy(report kyvernov1alpha2.ReportInterface) kyvernov1alpha2.ReportInterface
func DeleteReport ¶
func DeleteReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) error
func EngineResponseToReportResults ¶
func EngineResponseToReportResults(response *response.EngineResponse) []policyreportv1alpha2.PolicyReportResult
func GetResourceHash ¶
func IsGvkSupported ¶ added in v1.8.1
func IsGvkSupported(gvk schema.GroupVersionKind) bool
func IsPolicyLabel ¶
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 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 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 SetResults ¶
func SetResults(report kyvernov1alpha2.ReportInterface, results ...policyreportv1alpha2.PolicyReportResult)
func SortReportResults ¶
func SortReportResults(results []policyreportv1alpha2.PolicyReportResult)
func SplitResultsByPolicy ¶
func SplitResultsByPolicy(logger logr.Logger, results []policyreportv1alpha2.PolicyReportResult) map[string][]policyreportv1alpha2.PolicyReportResult
func UpdateReport ¶
func UpdateReport(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) (kyvernov1alpha2.ReportInterface, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.