Documentation ¶
Overview ¶
The starboard package provides primitives for working with Starboard toolkit.
Index ¶
- Constants
- func GetVersionFromImageRef(imageRef string) (string, error)
- func LinuxNodeAffinity() *corev1.Affinity
- func NewScheme() *runtime.Scheme
- type BuildInfo
- type ConfigData
- func (c ConfigData) GetAquaImageRef() (string, error)
- func (c ConfigData) GetConfigAuditReportsScanner() (Scanner, error)
- func (c ConfigData) GetConftestImageRef() (string, error)
- func (c ConfigData) GetKubeBenchImageRef() (string, error)
- func (c ConfigData) GetKubeHunterImageRef() (string, error)
- func (c ConfigData) GetKubeHunterQuick() (bool, error)
- func (c ConfigData) GetPolarisImageRef() (string, error)
- func (c ConfigData) GetTrivyImageRef() (string, error)
- func (c ConfigData) GetTrivyMode() (TrivyMode, error)
- func (c ConfigData) GetTrivyServerURL() (string, error)
- func (c ConfigData) GetVulnerabilityReportsScanner() (Scanner, error)
- type ConfigManager
- type PluginContext
- type PluginContextBuilder
- func (b *PluginContextBuilder) Build() PluginContext
- func (b *PluginContextBuilder) WithClient(client client.Client) *PluginContextBuilder
- func (b *PluginContextBuilder) WithName(name string) *PluginContextBuilder
- func (b *PluginContextBuilder) WithNamespace(namespace string) *PluginContextBuilder
- func (b *PluginContextBuilder) WithServiceAccountName(name string) *PluginContextBuilder
- type Scanner
- type TrivyMode
Constants ¶
const ( // NamespaceName the name of the namespace in which Starboard stores its // configuration and where it runs scan jobs. NamespaceName = "starboard" // ServiceAccountName the name of the service account used to provide // identity for scan jobs run by Starboard. ServiceAccountName = "starboard" // ConfigMapName the name of the ConfigMap where Starboard stores its // configuration. ConfigMapName = "starboard" // SecretName the name of the secret where Starboard stores is sensitive // configuration. SecretName = "starboard" )
const ( LabelResourceKind = "starboard.resource.kind" LabelResourceName = "starboard.resource.name" LabelResourceNamespace = "starboard.resource.namespace" LabelContainerName = "starboard.container.name" LabelPodSpecHash = "pod-spec-hash" LabelPluginConfigHash = "plugin-config-hash" LabelConfigAuditReportScan = "configAuditReport.scanner" LabelVulnerabilityReportScan = "vulnerabilityReport.scanner" LabelKubeBenchReportScan = "kubeBenchReport.scanner" LabelK8SAppManagedBy = "app.kubernetes.io/managed-by" AppStarboardOperator = "starboard-operator" )
const (
AnnotationContainerImages = "starboard.container-images"
)
Variables ¶
This section is empty.
Functions ¶
func GetVersionFromImageRef ¶
GetVersionFromImageRef returns the image identifier for the specified image reference.
func LinuxNodeAffinity ¶ added in v0.9.0
LinuxNodeAffinity constructs a new Affinity resource with linux supported nodes.
Types ¶
type BuildInfo ¶
BuildInfo holds build info such as Git revision, Git SHA-1, build datetime, and the name of the executable binary.
type ConfigData ¶
ConfigData holds Starboard configuration settings as a set of key-value pairs.
func GetDefaultConfig ¶
func GetDefaultConfig() ConfigData
GetDefaultConfig returns the default configuration settings.
func (ConfigData) GetAquaImageRef ¶ added in v0.8.0
func (c ConfigData) GetAquaImageRef() (string, error)
func (ConfigData) GetConfigAuditReportsScanner ¶ added in v0.10.0
func (c ConfigData) GetConfigAuditReportsScanner() (Scanner, error)
func (ConfigData) GetConftestImageRef ¶ added in v0.10.0
func (c ConfigData) GetConftestImageRef() (string, error)
func (ConfigData) GetKubeBenchImageRef ¶
func (c ConfigData) GetKubeBenchImageRef() (string, error)
func (ConfigData) GetKubeHunterImageRef ¶ added in v0.8.0
func (c ConfigData) GetKubeHunterImageRef() (string, error)
func (ConfigData) GetKubeHunterQuick ¶ added in v0.9.0
func (c ConfigData) GetKubeHunterQuick() (bool, error)
func (ConfigData) GetPolarisImageRef ¶ added in v0.8.0
func (c ConfigData) GetPolarisImageRef() (string, error)
func (ConfigData) GetTrivyImageRef ¶
func (c ConfigData) GetTrivyImageRef() (string, error)
func (ConfigData) GetTrivyMode ¶ added in v0.7.0
func (c ConfigData) GetTrivyMode() (TrivyMode, error)
func (ConfigData) GetTrivyServerURL ¶ added in v0.7.0
func (c ConfigData) GetTrivyServerURL() (string, error)
func (ConfigData) GetVulnerabilityReportsScanner ¶ added in v0.8.0
func (c ConfigData) GetVulnerabilityReportsScanner() (Scanner, error)
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 ConfigMap stored in the specified namespace.
type PluginContext ¶ added in v0.10.0
type PluginContext interface { // GetName returns the name of the plugin. GetName() string // GetConfig returns the v1.ConfigMap object that holds configuration settings of the plugin. GetConfig() (*corev1.ConfigMap, error) // GetNamespace return the name of the K8s Namespace where Starboard creates Jobs // and other helper objects. GetNamespace() string // GetServiceAccountName return the name of the K8s Service Account used to run workloads // created by Starboard. GetServiceAccountName() string }
PluginContext is plugin's execution context within the Starboard toolkit. The context is used to grant access to other methods so that this plugin can interact with the toolkit.
type PluginContextBuilder ¶ added in v0.10.0
type PluginContextBuilder struct {
// contains filtered or unexported fields
}
func NewPluginContext ¶ added in v0.10.0
func NewPluginContext() *PluginContextBuilder
func (*PluginContextBuilder) Build ¶ added in v0.10.0
func (b *PluginContextBuilder) Build() PluginContext
func (*PluginContextBuilder) WithClient ¶ added in v0.10.0
func (b *PluginContextBuilder) WithClient(client client.Client) *PluginContextBuilder
func (*PluginContextBuilder) WithName ¶ added in v0.10.0
func (b *PluginContextBuilder) WithName(name string) *PluginContextBuilder
func (*PluginContextBuilder) WithNamespace ¶ added in v0.10.0
func (b *PluginContextBuilder) WithNamespace(namespace string) *PluginContextBuilder
func (*PluginContextBuilder) WithServiceAccountName ¶ added in v0.10.0
func (b *PluginContextBuilder) WithServiceAccountName(name string) *PluginContextBuilder