agent

package
v17.6.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ErrImagePullBackOff - Container image pull failed, kubelet is backing off image pull
	ErrImagePullBackOff = "ImagePullBackOff"
	// ErrImageInspect - Unable to inspect imag
	ErrImageInspect = "ImageInspectError"
	// ErrImagePull - General image pull error
	ErrImagePull = "ErrImagePull"
	// ErrImageNeverPull - Required Image is absent on host and PullPolicy is NeverPullImage
	ErrImageNeverPull = "ErrImageNeverPull"
	// ErrInvalidImageName - Unable to parse the image name.
	ErrInvalidImageName = "InvalidImageName"
)

Variables

View Source
var TrivyScanner = report.ScannerDetails{
	ID:   "starboard_trivy",
	Name: "Trivy (via Starboard Operator)",
	Vendor: report.Vendor{
		Name: "GitLab",
	},
}

Functions

This section is empty.

Types

type CronScheduler

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

CronScheduler can run tasks on a cron schedule, with cancellation.

func NewCronScheduler

func NewCronScheduler() *CronScheduler

func (*CronScheduler) Run

func (s *CronScheduler) Run(ctx context.Context)

func (*CronScheduler) Schedule

func (s *CronScheduler) Schedule(ctx context.Context, schedule cron.Schedule, job Job)

type Factory

type Factory struct{}

func (*Factory) IsProducingLeaderModules

func (f *Factory) IsProducingLeaderModules() bool

func (*Factory) Name

func (f *Factory) Name() string

func (*Factory) New

func (f *Factory) New(cfg *modagent.Config) (modagent.Module, error)

type Job

type Job interface {
	// Run executes the cron task. It should cancel whatever it
	// is doing upon receiving a signal from ctx.Done.
	Run(context.Context)
}

type NamespaceScanner added in v17.5.0

type NamespaceScanner interface {
	// contains filtered or unexported methods
}

type Payload

type Payload struct {
	Vulnerability *report.Vulnerability `json:"vulnerability"`
	Scanner       report.ScannerDetails `json:"scanner"`
}

Payload resembles the create-starboard-vulnerability payload of the KAS API https://docs.gitlab.com/ee/development/internal_api/#create-starboard-vulnerability

type Reporter

type Reporter interface {
	Transmit(ctx context.Context, payloads []*Payload) ([]string, error)

	ResolveVulnerabilities(ctx context.Context, uuids []string) (retError error)
	// contains filtered or unexported methods
}

type Scanner added in v17.5.0

type Scanner interface {
	// contains filtered or unexported methods
}

type ScanningManager added in v17.5.0

type ScanningManager interface {
	// contains filtered or unexported methods
}

type SecurityPolicyConfiguration

type SecurityPolicyConfiguration struct {
	Cadence    string    `json:"cadence"`
	Namespaces []string  `json:"namespaces"`
	UpdatedAt  time.Time `json:"updated_at"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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