checker

package
v0.0.0-...-aa7570c Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[T any, U any](input []T, f func(T) U) []U

Types

type Aiven

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

func (Aiven) Run

func (a Aiven) Run(ctx context.Context) ([]Issue, error)

type Checker

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

func New

func New(config Config, pool *pgxpool.Pool, watchers *watchers.Watchers, fakeEnabled bool, log logrus.FieldLogger) (*Checker, error)

func (*Checker) RunChecks

func (c *Checker) RunChecks(ctx context.Context) error

func (*Checker) RunChecksOnce

func (c *Checker) RunChecksOnce(ctx context.Context)

type Config

type Config struct {
	AivenClient    aiven.AivenClient
	CloudSQLClient *sqlinstance.Client
	V13sClient     V13sClient
	Tenant         string
	Clusters       []string
	BifrostClient  unleash.BifrostClient
}

type Issue

type Issue struct {
	IssueType    issue.IssueType
	ResourceName string
	ResourceType issue.ResourceType
	Team         string
	Env          string
	Severity     issue.Severity
	Message      string
	IssueDetails any
}

type NaisWorkload

type NaisWorkload interface {
	GetEffectiveImage() string
	GetImage() string
	GetName() string
	GetNamespace() string
	GetStatus() *nais_io_v1.Status
}

type SQLInstance

type SQLInstance struct {
	Client             *sqlinstance.Client
	SQLInstanceWatcher *watcher.Watcher[*sqlinstance.SQLInstance]
	Log                logrus.FieldLogger
}

func (SQLInstance) Run

func (s SQLInstance) Run(ctx context.Context) ([]Issue, error)

type Unleash

type Unleash struct {
	UnleashWatcher *watcher.Watcher[*unleash.UnleashInstance]
	BifrostClient  unleash.BifrostClient
	Log            logrus.FieldLogger
}

func (Unleash) Run

func (u Unleash) Run(ctx context.Context) ([]Issue, error)

type V13sClient

type V13sClient interface {
	ListVulnerabilitySummaries(ctx context.Context, opts ...vulnerabilities.Option) (*vulnerabilities.ListVulnerabilitySummariesResponse, error)
	ListWorkloadsForVulnerability(ctx context.Context, vulnerabilityFilter vulnerabilities.VulnerabilityFilter, opts ...vulnerabilities.Option) (*vulnerabilities.ListWorkloadsForVulnerabilityResponse, error)
}

type Workload

type Workload struct {
	AppWatcher     watcher.Watcher[*nais_io_v1alpha1.Application]
	IngressWatcher watcher.Watcher[*netv1.Ingress]
	JobWatcher     watcher.Watcher[*nais_io_v1.Naisjob]
	PodWatcher     watcher.Watcher[*v1.Pod]
	RunWatcher     watcher.Watcher[*batchv1.Job]
	V13sClient     V13sClient
	// contains filtered or unexported fields
}

func (Workload) Run

func (w Workload) Run(ctx context.Context) ([]Issue, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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