func (r *ReconcileIntegration) UpdateDefaultConfigs(integration *wso2v1alpha1.Integration) EIController {
	eic := EIController{
		Host:              "wso2",
		AutoCreateIngress: true,
		SSLRedirect:       "true",
	}

	configMap := &corev1.ConfigMap{}
	err := r.client.Get(context.TODO(), types.NamespacedName{Name: nameForConfigMap(), Namespace: integration.Namespace}, configMap)

	if err == nil {
		if configMap.Data["host"] != "" {
			eic.Host = configMap.Data["host"]
		}

		if configMap.Data["autoIngressCreation"] != "" {
			if configMap.Data["autoIngressCreation"] == "true" {
				eic.AutoCreateIngress = true
			} else {
				eic.AutoCreateIngress = false
			}
		}

		if configMap.Data["sslRedirect"] != "" {
			if configMap.Data["sslRedirect"] == "true" {
				eic.SSLRedirect = "true"
			} else {
				eic.SSLRedirect = "false"
			}
		}

		if configMap.Data["ingressTLS"] != "" {
			eic.TLS = configMap.Data["ingressTLS"]
		}
	}
	return eic
}
// UpdateDefaultConfigs updates the default configs of Host, TLS, and ingress creation
UpdateDefaultConfigs updates the default configs of Host, TLS, and ingress creation
// UpdateDefaultConfigs updates the default configs of Host TLS and ingress creation
func (r *ReconcileIntegration) UpdateDefaultConfigs(integration *wso2v1alpha1.Integration) EIController {
	eic := EIController{
		Host:              "wso2",
		AutoCreateIngress: true,
		SSLRedirect:       "true",
	}
	configMap := &corev1.ConfigMap{}
	err := r.client.Get(context.TODO(), types.NamespacedName{Name: nameForConfigMap(), Namespace: integration.Namespace}, configMap)
	if err == nil {
		if configMap.Data["host"] != "" {
			eic.Host = configMap.Data["host"]
		}
		if configMap.Data["autoIngressCreation"] != "" {
			if configMap.Data["autoIngressCreation"] == "true" {
				eic.AutoCreateIngress = true
			} else {
				eic.AutoCreateIngress = false
			}
		}
		if configMap.Data["sslRedirect"] != "" {
			if configMap.Data["sslRedirect"] == "true" {
				eic.SSLRedirect = "true"
			} else {
				eic.SSLRedirect = "false"
			}
		}
		if configMap.Data["ingressTLS"] != "" {
			eic.TLS = configMap.Data["ingressTLS"]
		}
	}
	return eic
}
func ( r * ReconcileIntegration ) UpdateDefaultConfigs ( integration * wso2v1alpha1 . Integration ) EIController { eic := EIController { Host : " " , AutoCreateIngress : true , SSLRedirect : " " , } configMap := & corev1 . ConfigMap { } err := r . client . Get ( context . TODO ( ) , types . NamespacedName { Name : nameForConfigMap ( ) , Namespace : integration . Namespace } , configMap ) if err == nil { if configMap . Data [ " " ] != " " { eic . Host = configMap . Data [ " " ] } if configMap . Data [ " " ] != " " { if configMap . Data [ " " ] == " " { eic . AutoCreateIngress = true } else { eic . AutoCreateIngress = false } } if configMap . Data [ " " ] != " " { if configMap . Data [ " " ] == " " { eic . SSLRedirect = " " } else { eic . SSLRedirect = " " } } if configMap . Data [ " " ] != " " { eic . TLS = configMap . Data [ " " ] } } return eic }
UpdateDefaultConfigs updates the default configs of Host, TLS, and ingress creation
UpdateDefaultConfigs updates the default configs of Host TLS and ingress creation