etc

package
v0.0.1-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 4 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 {
	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"`
}

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"`
	Version  string `env:"OPERATOR_SCANNER_AQUA_CSP_VERSION" envDefault:"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"`
	Version string `env:"OPERATOR_SCANNER_TRIVY_VERSION" envDefault:"0.11.0"`
}

type VersionInfo

type VersionInfo struct {
	Version string
	Commit  string
	Date    string
}

Jump to

Keyboard shortcuts

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