starboard

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// NamespaceName the name of the namespace in which Starboard stores its
	// configuration and runs scan Jobs.
	NamespaceName = "starboard"

	// ServiceAccountName the name of the ServiceAccount used to run scan Jobs.
	ServiceAccountName = "starboard"

	// ConfigMapName the name of the ConfigMap that stored configuration of
	// Starboard and the underlying scanners.
	ConfigMapName = "starboard"
)

Variables

This section is empty.

Functions

func GetVersionFromImageRef

func GetVersionFromImageRef(imageRef string) (string, error)

GetVersionFromImageRef returns the image identifier for the specified image reference.

func NewScheme added in v0.7.0

func NewScheme() *runtime.Scheme

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

BuildInfo holds build info such as Git revision, Git SHA-1, and build datetime.

type ConfigData

type ConfigData map[string]string

ConfigData holds Starboard configuration settings as a set of key-value pairs.

func GetDefaultConfig

func GetDefaultConfig() ConfigData

GetDefaultConfig returns the default configuration data.

func (ConfigData) GetKubeBenchImageRef

func (c ConfigData) GetKubeBenchImageRef() string

GetKubeBenchImageRef returns Docker image of kube-bench scanner.

func (ConfigData) GetTrivyImageRef

func (c ConfigData) GetTrivyImageRef() string

func (ConfigData) GetTrivyMode added in v0.7.0

func (c ConfigData) GetTrivyMode() TrivyMode

func (ConfigData) GetTrivyServerURL added in v0.7.0

func (c ConfigData) GetTrivyServerURL() string

type ConfigManager added in v0.7.0

type ConfigManager interface {
	EnsureDefault(ctx context.Context) error
	Read(ctx context.Context) (ConfigData, error)
	Delete(ctx context.Context) error
}

ConfigManager defines methods for managing ConfigData.

func NewConfigManager added in v0.7.0

func NewConfigManager(client kubernetes.Interface, namespace string) ConfigManager

NewConfigManager constructs a new ConfigManager that is using kubernetes.Interface to manage ConfigData backed by the the ConfigMap stored in the specified namespace.

type TrivyConfig added in v0.7.0

type TrivyConfig interface {
	GetTrivyImageRef() string
	GetTrivyMode() TrivyMode
	GetTrivyServerURL() string
}

type TrivyMode added in v0.7.0

type TrivyMode string

TrivyMode describes mode in which Trivy client operates.

const (
	Standalone   TrivyMode = "Standalone"
	ClientServer TrivyMode = "ClientServer"
)

Jump to

Keyboard shortcuts

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