config

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: EPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package config is used by components to get configuration.

Typically each configuration property has the default value. Default value is supposed to be overridden via config map.

There is the following configuration names convention: - words are lower-cased - . is used to separate subcomponents - _ is used to separate words in the component name

Index

Constants

View Source
const (
	ConfigMapNameEnvVar      = "CONTROLLER_CONFIG_MAP_NAME"
	ConfigMapNamespaceEnvVar = "CONTROLLER_CONFIG_MAP_NAMESPACE"
)
View Source
const (
	WebhooksMemLimitEnvVar   = "WEBHOOKS_SERVER_MEMORY_LIMIT"
	WebhooksMemRequestEnvVar = "WEBHOOKS_SERVER_MEMORY_REQUEST"
	WebhooksCPULimitEnvVar   = "WEBHOOKS_SERVER_CPU_LIMIT"
	WebhooksCPURequestEnvVar = "WEBHOOKS_SERVER_CPU_REQUEST"
)

Variables

View Source
var ConfigMapReference = client.ObjectKey{
	Namespace: "",
	Name:      "devworkspace-controller-configmap",
}

Functions

func GetDevModeEnabled

func GetDevModeEnabled() bool

func GetMaxConcurrentReconciles added in v0.4.0

func GetMaxConcurrentReconciles() (int, error)

func GetResourceQuantityFromEnvVar added in v0.4.0

func GetResourceQuantityFromEnvVar(env string) (*resource.Quantity, error)

func GetWebhooksSecretName

func GetWebhooksSecretName() (string, error)

func SetupConfigForTesting

func SetupConfigForTesting(cm *corev1.ConfigMap)

func WatchControllerConfig

func WatchControllerConfig(mgr manager.Manager) error

Types

type ControllerConfig

type ControllerConfig struct {
	// contains filtered or unexported fields
}
var ControllerCfg ControllerConfig

func (*ControllerConfig) GetDefaultRoutingClass

func (wc *ControllerConfig) GetDefaultRoutingClass() string

func (*ControllerConfig) GetDefaultTerminalDockerimage

func (wc *ControllerConfig) GetDefaultTerminalDockerimage() (*dw.Component, error)

func (*ControllerConfig) GetExperimentalFeaturesEnabled

func (wc *ControllerConfig) GetExperimentalFeaturesEnabled() bool

GetExperimentalFeaturesEnabled returns true if experimental features should be enabled. DO NOT TURN ON IT IN THE PRODUCTION. Experimental features are not well tested and may be totally removed without announcement.

func (*ControllerConfig) GetPVCStorageClassName

func (wc *ControllerConfig) GetPVCStorageClassName() *string

func (*ControllerConfig) GetProperty

func (wc *ControllerConfig) GetProperty(name string) *string

func (*ControllerConfig) GetPropertyOrDefault

func (wc *ControllerConfig) GetPropertyOrDefault(name string, defaultValue string) string

func (*ControllerConfig) GetRoutingSuffix

func (wc *ControllerConfig) GetRoutingSuffix() string

func (*ControllerConfig) GetSidecarPullPolicy

func (wc *ControllerConfig) GetSidecarPullPolicy() string

func (*ControllerConfig) GetTlsInsecureSkipVerify

func (wc *ControllerConfig) GetTlsInsecureSkipVerify() string

func (*ControllerConfig) GetWorkspaceControllerSA

func (wc *ControllerConfig) GetWorkspaceControllerSA() (string, error)

func (*ControllerConfig) GetWorkspaceIdleTimeout

func (wc *ControllerConfig) GetWorkspaceIdleTimeout() string

func (*ControllerConfig) GetWorkspacePVCName

func (wc *ControllerConfig) GetWorkspacePVCName() string

func (*ControllerConfig) Validate

func (wc *ControllerConfig) Validate() error

type ControllerEnv

type ControllerEnv struct{}

Jump to

Keyboard shortcuts

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