controller

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpChecker

type HttpChecker interface {
	ServerHealthy(serverURL string) error
}

HttpChecker check health with http server

func NewHttpChecker

func NewHttpChecker() HttpChecker

type SbomReports added in v0.9.2

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

type ScanJobController

ScanJobController watches Kubernetes workloads and generates v1alpha1.VulnerabilityReport instances using vulnerability scanner that that implements the Plugin interface.

func (*ScanJobController) SetupWithManager

func (r *ScanJobController) SetupWithManager(mgr ctrl.Manager) error

type ScanJobRequest

type ScanJobRequest struct {
	Workload          client.Object
	Context           context.Context
	ClusterSbomReport map[string]v1alpha1.SbomReportData
}

ScanJobRequest encapsulate workload and context for processing

type ScanJobResult

type ScanJobResult struct {
	Result ctrl.Result
	Error  error
}

ScanJobResult encapsulate processing result and error

type ServerHealthChecker

type ServerHealthChecker interface {
	TrivyServerAvaliable(serverURL string) (bool, error)
}

func NewTrivyServerChecker added in v0.9.2

func NewTrivyServerChecker(expiration *time.Duration, cache gcache.Cache, httpChecker HttpChecker) ServerHealthChecker

type WorkloadController

type WorkloadController struct {
	logr.Logger
	etc.Config
	kube.ObjectResolver
	client.Client
	jobs.LimitChecker
	vulnerabilityreport.Plugin
	tunneloperator.PluginContext
	kube.SecretsReader
	tunneloperator.ConfigData
	ServerHealthChecker     ServerHealthChecker
	VulnerabilityReadWriter vulnerabilityreport.ReadWriter
	ExposedSecretReadWriter exposedsecretreport.ReadWriter
	SbomReadWriter          sbomreport.ReadWriter
	SubmitScanJobChan       chan ScanJobRequest
	ResultScanJobChan       chan ScanJobResult
	CacheSyncTimeout        time.Duration
}

WorkloadController watches Kubernetes workloads and generates v1alpha1.VulnerabilityReport instances using vulnerability scanner that that implements the Plugin interface.

func (*WorkloadController) ProcessScanJob

func (r *WorkloadController) ProcessScanJob()

func (*WorkloadController) SetupWithManager

func (r *WorkloadController) SetupWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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