etc

package
v0.6.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelPodSpecHash = "pod-spec-hash"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Operator       Operator
	ScannerAquaCSP ScannerAquaCSP
	ScannerTrivy   ScannerTrivy
}

func GetOperatorConfig

func GetOperatorConfig() (Config, error)

type InstallMode

type InstallMode string

InstallMode represents multitenancy support defined by the Operator Lifecycle Manager spec.

const (
	InstallModeOwnNamespace    InstallMode = "OwnNamespace"
	InstallModeSingleNamespace InstallMode = "SingleNamespace"
	InstallModeMultiNamespace  InstallMode = "MultiNamespace"
	InstallModeAllNamespaces   InstallMode = "AllNamespaces"
)

type Operator

type Operator struct {
	Namespace              string        `env:"OPERATOR_NAMESPACE"`
	TargetNamespaces       string        `env:"OPERATOR_TARGET_NAMESPACES"`
	ServiceAccount         string        `env:"OPERATOR_SERVICE_ACCOUNT" envDefault:"starboard-operator"`
	ScanJobTimeout         time.Duration `env:"OPERATOR_SCAN_JOB_TIMEOUT" envDefault:"5m"`
	MetricsBindAddress     string        `env:"OPERATOR_METRICS_BIND_ADDRESS" envDefault:":8080"`
	HealthProbeBindAddress string        `env:"OPERATOR_HEALTH_PROBE_BIND_ADDRESS" envDefault:":9090"`
	LogDevMode             bool          `env:"OPERATOR_LOG_DEV_MODE" envDefault:"false"`
}

func (Operator) GetInstallMode

func (c Operator) GetInstallMode() (InstallMode, error)

GetInstallMode resolves InstallMode based on configured operator and target namespaces.

func (Operator) GetOperatorNamespace

func (c Operator) GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the namespace the operator should be running in.

func (Operator) GetTargetNamespaces

func (c Operator) GetTargetNamespaces() []string

GetTargetNamespaces returns namespaces the operator should be watching for changes.

type ScannerAquaCSP

type ScannerAquaCSP struct {
	Enabled  bool   `env:"OPERATOR_SCANNER_AQUA_CSP_ENABLED" envDefault:"false"`
	ImageRef string `env:"OPERATOR_SCANNER_AQUA_CSP_IMAGE" envDefault:"aquasec/scanner:5.0"`
	Host     string `env:"OPERATOR_SCANNER_AQUA_CSP_HOST"`
	Username string `env:"OPERATOR_SCANNER_AQUA_CSP_USERNAME"`
	Password string `env:"OPERATOR_SCANNER_AQUA_CSP_PASSWORD"`
}

type ScannerTrivy

type ScannerTrivy struct {
	Enabled  bool   `env:"OPERATOR_SCANNER_TRIVY_ENABLED" envDefault:"true"`
	ImageRef string `env:"OPERATOR_SCANNER_TRIVY_IMAGE" envDefault:"aquasec/trivy:0.11.0"`
}

func (ScannerTrivy) GetTrivyImageRef

func (c ScannerTrivy) GetTrivyImageRef() string

Jump to

Keyboard shortcuts

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