infra

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrivySource  = "Trivy InfraAssessment"
	ReportPrefix = "trivy-infra-polr"
)

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":        "InfraAssessmentReport",
}

Functions

func GenerateReportName added in v0.11.0

func GenerateReportName(name string) string

func MapResult

func MapResult(success bool) v1alpha2.PolicyResult

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(mgr manager.Manager, controller controller.Controller, rclient ReportClient) *Client

func (*Client) StartWatching

func (e *Client) StartWatching(ctx context.Context) error

type ReportClient added in v0.11.0

type ReportClient interface {
	GenerateReport(ctx context.Context, report *v1alpha1.InfraAssessmentReport) error
	DeleteReport(ctx context.Context, report *v1alpha1.InfraAssessmentReport) error
}

func NewReportClient added in v0.11.0

func NewReportClient(client pr.Wgpolicyk8sV1alpha2Interface, applyLabels []string) ReportClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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