Documentation
¶
Index ¶
- Constants
- Variables
- func CreateObjectReference(report *v1alpha1.ExposedSecretReport) *corev1.ObjectReference
- func CreateSummary(report *v1alpha1.ExposedSecretReport) v1alpha2.PolicyReportSummary
- func GenerateID(uid, name, policy, rule, result, category string) string
- func GenerateReportName(report *v1alpha1.ExposedSecretReport) string
- type Client
- type ReportClient
Constants ¶
View Source
const ( TrivySource = "Trivy ExposedSecrets" ReportPrefix = "trivy-exp-secret-polr" Category = "ExposedSecret" ContainerLabel = "trivy-operator.container.name" KindLabel = "trivy-operator.resource.kind" NameAnnotation = "trivy-operator.resource.name" NamespaceLabel = "trivy-operator.resource.namespace" )
Variables ¶
View Source
var ReportLabels = map[string]string{
"app.kubernetes.io/managed-by": "trivy-operator-polr-adapter",
"app.kubernetes.io/created-by": "trivy-operator-polr-adapter",
"trivy-operator.source": "ExposedSecretReport",
}
Functions ¶
func CreateObjectReference ¶
func CreateObjectReference(report *v1alpha1.ExposedSecretReport) *corev1.ObjectReference
func CreateSummary ¶
func CreateSummary(report *v1alpha1.ExposedSecretReport) v1alpha2.PolicyReportSummary
func GenerateID ¶ added in v0.11.0
func GenerateReportName ¶ added in v0.11.0
func GenerateReportName(report *v1alpha1.ExposedSecretReport) string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(mgr manager.Manager, client controller.Controller, rclient ReportClient) *Client
type ReportClient ¶ added in v0.11.0
type ReportClient interface {
GenerateReport(ctx context.Context, report *v1alpha1.ExposedSecretReport) error
DeleteReport(ctx context.Context, report *v1alpha1.ExposedSecretReport) error
}
func NewReportClient ¶ added in v0.11.0
func NewReportClient(client pr.Wgpolicyk8sV1alpha2Interface, applyLabels []string) ReportClient
Click to show internal directories.
Click to hide internal directories.