settings

package
v0.0.0-...-e73b65a Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FeatureOvirtWarmMigration        = "FEATURE_OVIRT_WARM_MIGRATION"
	FeatureRetainPrecopyImporterPods = "FEATURE_RETAIN_PRECOPY_IMPORTER_PODS"
	FeatureVsphereIncrementalBackup  = "FEATURE_VSPHERE_INCREMENTAL_BACKUP"
)

Environment Variables

View Source
const (
	AllowedOrigins = "CORS_ALLOWED_ORIGINS"
	WorkingDir     = "WORKING_DIR"
	AuthRequired   = "AUTH_REQUIRED"
	Host           = "API_HOST"
	Port           = "API_PORT"
	TLSEnabled     = "API_TLS_ENABLED"
	TLSCertificate = "API_TLS_CERTIFICATE"
	TLSKey         = "API_TLS_KEY"
	TLSCa          = "API_TLS_CA"
)

Environment variables.

View Source
const (
	LogDevelopment = logging.EnvDevelopment
	LogLevel       = logging.EnvLevel
)

Environment variables.

View Source
const (
	MaxVmInFlight   = "MAX_VM_INFLIGHT"
	HookRetry       = "HOOK_RETRY"
	ImporterRetry   = "IMPORTER_RETRY"
	VirtV2vImage    = "VIRT_V2V_IMAGE"
	PrecopyInterval = "PRECOPY_INTERVAL"
)

Environment variables.

View Source
const (
	PolicyAgentURL            = "POLICY_AGENT_URL"
	PolicyAgentCA             = "POLICY_AGENT_CA"
	PolicyAgentWorkerLimit    = "POLICY_AGENT_WORKER_LIMIT"
	PolicyAgentSearchInterval = "POLICY_AGENT_SEARCH_INTERVAL"
)

Environment variables.

View Source
const (
	ProfilePath     = "PROFILE_PATH"
	ProfileDuration = "PROFILE_DURATION"
	ProfileKind     = "PROFILE_KIND"
	ProfileMemory   = "memory"
	ProfileCpu      = "cpu"
	ProfileMutex    = "mutex"
)

Environment variables.

View Source
const (
	Roles         = "ROLE"
	InventoryRole = "inventory"
	MainRole      = "main"
)

Environment variables & roles.

View Source
const (
	DefaultVirtV2vImage = "quay.io/konveyor/forklift-virt-v2v:latest"
)

Default virt-v2v image.

View Source
const (
	MetricsPort = "METRICS_PORT"
)

Environment variables.

View Source
const (
	ServiceCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
)

k8s pod default.

Variables

View Source
var Settings = ControllerSettings{}

Global

Functions

This section is empty.

Types

type CORS

type CORS struct {
	// Allowed origins.
	AllowedOrigins []string
}

CORS

type ControllerSettings

type ControllerSettings struct {
	// Roles.
	Role
	// Metrics settings.
	Metrics
	// Inventory settings.
	Inventory
	// Migration settings.
	Migration
	// Policy agent settings.
	PolicyAgent
	// Logging settings.
	Logging
	// Profiler settings.
	Profiler
	// Feature gates.
	Features
}

Settings

func (*ControllerSettings) Load

func (r *ControllerSettings) Load() error

Load settings.

type Features

type Features struct {
	// Whether migration is supported from oVirt sources.
	OvirtWarmMigration bool
	// Whether importer pods should be retained during warm migration.
	// Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2016290
	RetainPrecopyImporterPods bool
	// Whether to use changeID-based incremental backup workflow (with a version of CDI that supports it)
	VsphereIncrementalBackup bool
}

Feature gates.

func (*Features) Load

func (r *Features) Load() (err error)

Load settings.

type Inventory

type Inventory struct {
	// CORS settings.
	CORS CORS
	// DB working directory.
	WorkingDir string
	// Authorization required.
	AuthRequired bool
	// Host.
	Host string
	// Port
	Port int
	// TLS
	TLS struct {
		// Enabled.
		Enabled bool
		// Certificate path
		Certificate string
		// Key path
		Key string
		// CA path
		CA string
	}
}

Inventory settings.

func (*Inventory) Load

func (r *Inventory) Load() error

Load settings.

type Logging

type Logging struct {
	// Development (mode).
	Development bool
	// Level.
	Level int
}

Logging settings

func (*Logging) Load

func (r *Logging) Load() error

Load settings.

type Metrics

type Metrics struct {
	// Metrics port. 0 = disabled.
	Port int
}

Metrics settings

func (*Metrics) Address

func (r *Metrics) Address() string

Metrics address. Port = 0 will disable metrics.

func (*Metrics) Load

func (r *Metrics) Load() error

Load settings.

type Migration

type Migration struct {
	// Max VMs in-flight.
	MaxInFlight int
	// Hook fail/retry limit.
	HookRetry int
	// Importer pod retry limit.
	ImporterRetry int
	// Warm migration precopy interval in minutes
	PrecopyInterval int
	// Virt-v2v image for guest conversion
	VirtV2vImage string
}

Migration settings

func (*Migration) Load

func (r *Migration) Load() (err error)

Load settings.

type PolicyAgent

type PolicyAgent struct {
	// URL.
	URL string
	// TLS
	TLS struct {
		// CA path
		CA string
	}
	// Search interval (seconds).
	SearchInterval int
	// Limits.
	Limit struct {
		// Number of workers.
		Worker int
	}
}

Policy agent settings.

func (*PolicyAgent) Enabled

func (r *PolicyAgent) Enabled() bool

Enabled.

func (*PolicyAgent) Load

func (r *PolicyAgent) Load() (err error)

Load settings.

type Profiler

type Profiler struct {
	// Profiler output directory.
	Path string
	// Profiler duration (minutes).
	Duration time.Duration
	//
	Kind string
}

Profiler settings

func (*Profiler) Load

func (r *Profiler) Load() error

Load settings.

type Role

type Role struct {
	// Enabled roles.
	Roles map[string]bool
}

Role settings

func (*Role) Has

func (r *Role) Has(name string) bool

Test has-role.

func (*Role) Load

func (r *Role) Load() error

Load settings.

Jump to

Keyboard shortcuts

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