Documentation
¶
Overview ¶
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func ConfigMapPredicates(mgr manager.Manager) predicate.Predicate
- func SetupConfigForTesting(cm *corev1.ConfigMap)
- func WatchControllerConfig(mgr manager.Manager) error
- type ControllerConfig
- func (wc *ControllerConfig) GetDefaultRoutingClass() string
- func (wc *ControllerConfig) GetExperimentalFeaturesEnabled() bool
- func (wc *ControllerConfig) GetPVCStorageClassName() *string
- func (wc *ControllerConfig) GetProperty(name string) *string
- func (wc *ControllerConfig) GetPropertyOrDefault(name string, defaultValue string) string
- func (wc *ControllerConfig) GetSidecarPullPolicy() string
- func (wc *ControllerConfig) GetWorkspaceIdleTimeout() string
- func (wc *ControllerConfig) GetWorkspacePVCName() string
- func (wc *ControllerConfig) Validate() error
Constants ¶
const ( ConfigMapNameEnvVar = "CONTROLLER_CONFIG_MAP_NAME" ConfigMapNamespaceEnvVar = "CONTROLLER_CONFIG_MAP_NAMESPACE" )
const ( // RoutingSuffix is the base domain for routes/ingresses created on the cluster. All // routes/ingresses will be created with URL http(s)://<unique-to-workspace-part>.<RoutingSuffix> // is supposed to be used by embedded routing solvers only RoutingSuffix = "devworkspace.routing.cluster_host_suffix" )
Variables ¶
var ConfigMapReference = client.ObjectKey{
Namespace: "",
Name: "devworkspace-controller-configmap",
}
Functions ¶
func SetupConfigForTesting ¶
func WatchControllerConfig ¶
Types ¶
type ControllerConfig ¶
type ControllerConfig struct {
// contains filtered or unexported fields
}
var ControllerCfg ControllerConfig
func (*ControllerConfig) GetDefaultRoutingClass ¶
func (wc *ControllerConfig) GetDefaultRoutingClass() string
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) GetSidecarPullPolicy ¶
func (wc *ControllerConfig) GetSidecarPullPolicy() string
func (*ControllerConfig) GetWorkspaceIdleTimeout ¶
func (wc *ControllerConfig) GetWorkspaceIdleTimeout() string
func (*ControllerConfig) GetWorkspacePVCName ¶
func (wc *ControllerConfig) GetWorkspacePVCName() string
func (*ControllerConfig) Validate ¶
func (wc *ControllerConfig) Validate() error