config

package
v2.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScannerJobResultListenPort           = "SCANNER_JOB_RESULT_LISTEN_PORT"
	CredsSecretNamespace                 = "CREDS_SECRET_NAMESPACE" // nolint: gosec
	ScannerJobTemplateConfigMapName      = "SCANNER_JOB_TEMPLATE_CONFIG_MAP_NAME"
	ScannerJobTemplateConfigMapNamespace = "SCANNER_JOB_TEMPLATE_CONFIG_MAP_NAMESPACE"
)
View Source
const (
	MaxParallelism               = "MAX_PARALLELISM"
	TargetNamespace              = "TARGET_NAMESPACE"
	IgnoreNamespaces             = "IGNORE_NAMESPACES"
	JobResultTimeout             = "JOB_RESULT_TIMEOUT"
	DeleteJobPolicy              = "DELETE_JOB_POLICY"
	ShouldScanCISDockerBenchmark = "SHOULD_SCAN_CIS_DOCKER_BENCHMARK"
	RegistryInsecure             = "REGISTRY_INSECURE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ScannerJobResultListenPort int
	CredsSecretNamespace       string
	ScannerJobTemplate         *batchv1.Job
}

func LoadConfig

func LoadConfig(clientset kubernetes.Interface) (*Config, error)

type DeleteJobPolicyType

type DeleteJobPolicyType string
const (
	DeleteJobPolicyAll        DeleteJobPolicyType = "All"
	DeleteJobPolicyNever      DeleteJobPolicyType = "Never"
	DeleteJobPolicySuccessful DeleteJobPolicyType = "Successful"
)

func (DeleteJobPolicyType) IsValid

func (dj DeleteJobPolicyType) IsValid() bool

type ScanConfig

type ScanConfig struct {
	MaxScanParallelism           int
	TargetNamespaces             []string
	IgnoredNamespaces            []string
	JobResultTimeout             time.Duration
	DeleteJobPolicy              DeleteJobPolicyType
	ShouldScanCISDockerBenchmark bool
}

func LoadScanConfig

func LoadScanConfig() *ScanConfig

Jump to

Keyboard shortcuts

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