Add documentation on why proxy configuration is disabled in DWO
Co-authored-by: Anatolii Bazko <abazko@redhat.com> Signed-off-by: Angel Misevski <amisevsk@redhat.com>pull/1770/head
parent
85da4743ef
commit
851f110311
|
|
@ -341,7 +341,7 @@ func TestCreatesDataInNamespace(t *testing.T) {
|
|||
assert.Equal(t, "true", proxySettings.GetLabels()[dwconstants.DevWorkspaceMountLabel],
|
||||
"proxy settings should be labeled as mounted")
|
||||
|
||||
assert.Equal(t, 2, len(proxySettings.Data), "Expecting just 1 element in the default proxy settings")
|
||||
assert.Equal(t, 2, len(proxySettings.Data), "Expecting 2 elements in the default proxy settings")
|
||||
|
||||
assert.Equal(t, ".svc", proxySettings.Data["NO_PROXY"], "Unexpected proxy settings")
|
||||
|
||||
|
|
|
|||
|
|
@ -105,11 +105,15 @@ func updateWorkspaceConfig(ctx *chetypes.DeployContext, operatorConfig *controll
|
|||
|
||||
updateWorkspaceImagePullPolicy(devEnvironments.ImagePullPolicy, operatorConfig.Workspace)
|
||||
|
||||
// If the CheCluster has a configured proxy, or if the Che Operator has detected a proxy configuration,
|
||||
// we need to disable automatic proxy handling in the DevWorkspace Operator as its implementation collides
|
||||
// with ours -- they set environment variables the deployment spec explicitly, which overrides the proxy-settings
|
||||
// automount configmap.
|
||||
if ctx.Proxy.HttpProxy != "" || ctx.Proxy.HttpsProxy != "" {
|
||||
if operatorConfig.Routing == nil {
|
||||
operatorConfig.Routing = &controllerv1alpha1.RoutingConfig{}
|
||||
}
|
||||
updateProxyConfig(operatorConfig.Routing)
|
||||
disableDWOProxy(operatorConfig.Routing)
|
||||
}
|
||||
|
||||
operatorConfig.Workspace.DeploymentStrategy = v1.DeploymentStrategyType(utils.GetValue(string(devEnvironments.DeploymentStrategy), constants.DefaultDeploymentStrategy))
|
||||
|
|
@ -221,7 +225,7 @@ func updateProjectCloneConfig(devEnvironments *chev2.CheClusterDevEnvironments,
|
|||
workspaceConfig.ProjectCloneConfig.Resources = cheResourcesToCoreV1Resources(container.Resources)
|
||||
}
|
||||
|
||||
func updateProxyConfig(routingConfig *controllerv1alpha1.RoutingConfig) {
|
||||
func disableDWOProxy(routingConfig *controllerv1alpha1.RoutingConfig) {
|
||||
// Since we create proxy configmaps to mount proxy settings, we want to disable
|
||||
// proxy handling in DWO; otherwise the env vars added by DWO will override the env
|
||||
// vars we intend to mount via configmap.
|
||||
|
|
|
|||
Loading…
Reference in New Issue