imagescan

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled                   bool
	CastaiSecretRefName       string
	ScanInterval              time.Duration `validate:"required"`
	ScanTimeout               time.Duration
	MaxConcurrentScans        int64 `validate:"required"`
	ScanJobImagePullPolicy    string
	Mode                      string
	CPURequest                string
	CPULimit                  string
	MemoryRequest             string
	MemoryLimit               string
	ProfileEnabled            bool
	PhlareEnabled             bool
	PrivateRegistryPullSecret string
	ServiceAccount            string
	InitDelay                 time.Duration
	CastaiGRPCAddress         string
	CastaiClusterID           string
	CastaiGrpcInsecure        bool
	ImageScanBlobsCacheURL    string
}

type Controller

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

func NewController

func NewController(
	log *logging.Logger,
	cfg Config,
	imageScanner imageScanner,
	client castaiClient,
	kubeController kubeClient,
) *Controller

func (*Controller) OnAdd

func (c *Controller) OnAdd(obj kube.Object)

func (*Controller) OnDelete

func (c *Controller) OnDelete(obj kube.Object)

func (*Controller) OnUpdate

func (c *Controller) OnUpdate(obj kube.Object)

func (*Controller) RequiredTypes

func (c *Controller) RequiredTypes() []reflect.Type

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

type ImageScanImage

type ImageScanImage struct {
	PullPolicy string `envconfig:"IMAGE_SCAN_IMAGE_PULL_POLICY" yaml:"pullPolicy"`
}

type Log

type Log struct {
	Timestamp string
	Level     string
	Message   string
	Component string
}

type ScanImageParams

type ScanImageParams struct {
	ImageName                   string // Example: ghcr.io/castai/kvisor/kvisor:8889dc92d6c69420a811de4fc67e619a30c028e9
	ImageID                     string // Example: ghcr.io/castai/kvisor/kvisor@sha256:2db087348c66274941013a3163036b1ca09da03ea64e9f9cdd79b8f647e4fe44
	ContainerRuntime            string
	Mode                        string
	NodeName                    string
	ResourceIDs                 []string
	DeleteFinishedJob           bool
	WaitForCompletion           bool
	WaitDurationAfterCompletion time.Duration
	Architecture                string
	Os                          string

	ScanImageDetails kube.ImageDetails
}

type Scanner

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

func NewImageScanner

func NewImageScanner(client kubernetes.Interface, cfg Config, podNamespace string) *Scanner

func (*Scanner) ScanImage

func (s *Scanner) ScanImage(ctx context.Context, params ScanImageParams) (rerr error)

Jump to

Keyboard shortcuts

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