Skip to content

Commit

Permalink
Include additional cluster-wide trusted CA into Che
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
  • Loading branch information
mmorhun committed Mar 15, 2021
1 parent 9f241d0 commit 3b3ea49
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/controller/che/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,21 @@ func (r *ReconcileChe) getProxyConfiguration(checluster *orgv1.CheCluster) (*dep
} else {
cheClusterProxyConf.NoProxy = deploy.MergeNonProxy(cheClusterProxyConf.NoProxy, ".svc")
}
// Add cluster-wide trusted CA certs
if clusterWideProxyConf.TrustedCAMapName != "" {
cheClusterProxyConf.TrustedCAMapName = clusterWideProxyConf.TrustedCAMapName
}
return cheClusterProxyConf, nil
} else if clusterWideProxyConf.HttpProxy != "" {
clusterWideProxyConf.NoProxy = deploy.MergeNonProxy(clusterWideProxyConf.NoProxy, cheClusterProxyConf.NoProxy)
return clusterWideProxyConf, nil
}

// proxy isn't configured
return &deploy.Proxy{}, nil
// Proxy isn't configured
// However add cluster-wide trusted CA certificates, if any, to Che
return &deploy.Proxy{
TrustedCAMapName: clusterWideProxyConf.TrustedCAMapName,
}, nil
}

// OpenShift 3.x and k8s
Expand Down

0 comments on commit 3b3ea49

Please sign in to comment.