settings

package
v0.0.0-...-25f5b1c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllowedOrigins = "CORS_ALLOWED_ORIGINS"
	WorkingDir     = "WORKING_DIR"
	AuthOptional   = "AUTH_OPTIONAL"
	CollectEvents  = "DISCOVERY_COLLECT_EVENTS"
)

Environment variables.

View Source
const (
	RsyncOptBwLimit               = "RSYNC_OPT_BWLIMIT"
	RsyncOptPartial               = "RSYNC_OPT_PARTIAL"
	RsyncOptArchive               = "RSYNC_OPT_ARCHIVE"
	RsyncOptDelete                = "RSYNC_OPT_DELETE"
	RsyncOptHardLinks             = "RSYNC_OPT_HARDLINKS"
	RsyncOptInfo                  = "RSYNC_OPT_INFO"
	RsyncOptExtras                = "RSYNC_OPT_EXTRAS"
	RsyncBackOffLimit             = "RSYNC_BACKOFF_LIMIT"
	EnablePVResizing              = "ENABLE_DVM_PV_RESIZING"
	TCPProxyKey                   = "STUNNEL_TCP_PROXY"
	StunnelVerifyCAKey            = "STUNNEL_VERIFY_CA"
	StunnelVerifyCALevelKey       = "STUNNEL_VERIFY_CA_LEVEL"
	SourceSupplementalGroups      = "SOURCE_SUPPLEMENTAL_GROUPS"
	DestinationSupplementalGroups = "TARGET_SUPPLEMENTAL_GROUPS"
)

DVM options

View Source
const (
	NsLimit                        = "NAMESPACE_LIMIT"
	PodLimit                       = "POD_LIMIT"
	PvLimit                        = "PV_LIMIT"
	ExcludedResources              = "EXCLUDED_RESOURCES"
	ISResource                     = "imagestreams"
	PVResource                     = "persistentvolumes"
	PVCResource                    = "persistentvolumeclaims"
	EnableIntelligentPVResize      = "ENABLE_INTELLIGENT_PV_RESIZE"
	PvMoveStorageClasses           = "PV_MOVE_STORAGECLASSES"
	PVResizingVolumeUsageThreshold = "PV_RESIZING_USAGE_THRESHOLD"
)

Environment variables.

View Source
const (
	// Role environment variable.
	Role = "ROLE"
	// CAM role.
	// Only migration controllers should be loaded.
	MtcRole = "mtc"
	// Discovery role.
	// Only the discovery should be loaded.
	DiscoveryRole = "discovery"
	// Proxy environment variables
	HttpProxy  = "HTTP_PROXY"
	HttpsProxy = "HTTPS_PROXY"
	NoProxy    = "NO_PROXY"
	// Disable image copy
	DisableImageCopy = "DISABLE_IMAGE_COPY"
	// Enable cached remote client
	EnableCachedClient = "ENABLE_CACHED_CLIENT"
)

Manager roles.

View Source
const (
	JaegerEnabled = "JAEGER_ENABLED"
)

Jaeger options

Variables

View Source
var ExcludedInitialResources = mapset.NewSetFromSlice([]interface{}{
	ISResource,
	PVResource,
	PVCResource,
})

Excluded resource defaults

View Source
var ExcludedStageResources = mapset.NewSetFromSlice([]interface{}{})
View Source
var IncludedInitialResources = mapset.NewSetFromSlice([]interface{}{})

Included resource defaults

View Source
var IncludedStageResources = mapset.NewSetFromSlice([]interface{}{
	"serviceaccount",
	PVResource,
	PVCResource,
	"namespaces",
	ISResource,
	"secrets",
	"configmaps",
	"pods",
})
View Source
var MoveStorageClasses = mapset.NewSetFromSlice([]interface{}{})
View Source
var Settings = _Settings{}

Global

Functions

This section is empty.

Types

type CORS

type CORS struct {
	AllowedOrigins []string
}

CORS

AllowedOrigins: Allowed origins.

type Discovery

type Discovery struct {
	CORS          CORS
	WorkingDir    string
	AuthOptional  bool
	CollectEvents bool
}

Discovery settings.

Origins: Permitted CORS allowed origins.
AuthOptional: Authorization header is optional.
CollectEvents: Discovery Service event collection switch. May want to turn off in large clusters.

func (*Discovery) Load

func (r *Discovery) Load() error

Load settings.

type DvmOpts

type DvmOpts struct {
	RsyncOpts
	FileOwnershipOpts
	EnablePVResizing     bool
	StunnelTCPProxy      string
	StunnelVerifyCA      bool
	StunnelVerifyCALevel string
}

DvmOpts DVM settings

func (*DvmOpts) Load

func (r *DvmOpts) Load() error

Load loads DVM options

type FileOwnershipOpts

type FileOwnershipOpts struct {
	SourceSupplementalGroups      []int64
	DestinationSupplementalGroups []int64
}

func (*FileOwnershipOpts) Load

func (f *FileOwnershipOpts) Load() error

type JaegerOpts

type JaegerOpts struct {
	Enabled bool
}

Jaeger Options

Enabled: whether to emit jaeger spans from controller

func (*JaegerOpts) Load

func (r *JaegerOpts) Load() error

Load load rsync options

type Plan

type Plan struct {
	NsLimit                        int
	PodLimit                       int
	PvLimit                        int
	EnableIntelligentPVResize      bool
	PVResizingVolumeUsageThreshold int
	ExcludedResources              []string
	MoveStorageClasses             []string
}

Plan settings.

NsLimit: Maximum number of namespaces on a Plan.
PodLimit: Maximum number of Pods across namespaces.
PvLimit: Maximum number PVs on a Plan.
ExcludedResources: Resources excluded from a Plan.
EnableIntelligentPVResize: Enable/Disable PV resizing at plan level
PVResizingVolumeUsageThreshold: Usage percentage threshold for pv resizing

func (*Plan) Load

func (r *Plan) Load() error

Load settings.

type RsyncOpts

type RsyncOpts struct {
	BwLimit      int
	Archive      bool
	Partial      bool
	Delete       bool
	HardLinks    bool
	Info         string
	Extras       []string
	BackOffLimit int
}

RsyncOpts Rsync Options

BwLimit: equivalent to --bwlimit=<integer>
Archive: whether to set --archive option or not
Partial: whether to set --partial option or not
Delete:  whether to set --delete option or not
HardLinks: whether to set --hard-links option or not
Extras: arbitrary rsync options provided by the user
BackOffLimit: defines number of retries set on Rsync

func (*RsyncOpts) Load

func (r *RsyncOpts) Load() error

Load load rsync options

Jump to

Keyboard shortcuts

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