Use the default ingress strategy if there is no value in CR (#346)
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>pull/347/head
parent
a9092b21d6
commit
26c69782bd
|
|
@ -49,7 +49,8 @@ func SyncDevfileRegistryToCluster(checluster *orgv1.CheCluster, clusterAPI Clust
|
|||
}
|
||||
}
|
||||
|
||||
if checluster.Spec.K8s.IngressStrategy == "multi-host" {
|
||||
ingressStrategy := util.GetValue(checluster.Spec.K8s.IngressStrategy, DefaultIngressStrategy)
|
||||
if ingressStrategy == "multi-host" {
|
||||
host = DevfileRegistry + "-" + checluster.Namespace + "." + checluster.Spec.K8s.IngressDomain
|
||||
} else {
|
||||
host = checluster.Spec.K8s.IngressDomain + "/" + DevfileRegistry
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ func getClusterIngress(name string, namespace string, client runtimeClient.Clien
|
|||
|
||||
func getSpecIngress(checluster *orgv1.CheCluster, name string, serviceName string, port int, clusterAPI ClusterAPI) (*v1beta1.Ingress, error) {
|
||||
tlsSupport := checluster.Spec.Server.TlsSupport
|
||||
ingressStrategy := checluster.Spec.K8s.IngressStrategy
|
||||
ingressStrategy := util.GetValue(checluster.Spec.K8s.IngressStrategy,DefaultIngressStrategy)
|
||||
if len(ingressStrategy) < 1 {
|
||||
ingressStrategy = "multi-host"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ func SyncPluginRegistryToCluster(checluster *orgv1.CheCluster, clusterAPI Cluste
|
|||
}
|
||||
}
|
||||
|
||||
if checluster.Spec.K8s.IngressStrategy == "multi-host" {
|
||||
ingressStrategy := util.GetValue(checluster.Spec.K8s.IngressStrategy, DefaultIngressStrategy)
|
||||
if ingressStrategy == "multi-host" {
|
||||
host = PluginRegistry + "-" + checluster.Namespace + "." + checluster.Spec.K8s.IngressDomain
|
||||
} else {
|
||||
host = checluster.Spec.K8s.IngressDomain + "/" + PluginRegistry
|
||||
|
|
|
|||
Loading…
Reference in New Issue