imagescan

package
v0.37.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeltaState

func NewDeltaState(scannedImages []castai.ScannedImage) *deltaState

func NewSubscriber

func NewSubscriber(
	log logrus.FieldLogger,
	cfg config.ImageScan,
	imageScanner imageScanner,
	k8sVersionMinor int,
	delta *deltaState,
) controller.ObjectSubscriber

Types

type ScanHTTPHandler added in v0.35.0

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

ScanHTTPHandler receives image metadata from scan job and sends it to CAST AI platform.

func NewScanHttpHandler added in v0.35.0

func NewScanHttpHandler(log logrus.FieldLogger, client castai.Client) *ScanHTTPHandler

func (*ScanHTTPHandler) Handle added in v0.35.0

func (h *ScanHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)

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
}

type Scanner

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

func NewImageScanner

func NewImageScanner(client kubernetes.Interface, cfg config.Config, deltaState *deltaState) *Scanner

func (*Scanner) ScanImage

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

type Subscriber

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

func (*Subscriber) OnAdd

func (s *Subscriber) OnAdd(obj controller.Object)

func (*Subscriber) OnDelete

func (s *Subscriber) OnDelete(obj controller.Object)

func (*Subscriber) OnUpdate

func (s *Subscriber) OnUpdate(obj controller.Object)

func (*Subscriber) RequiredInformers

func (s *Subscriber) RequiredInformers() []reflect.Type

func (*Subscriber) Run

func (s *Subscriber) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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