diff --git a/controllers/activemqartemis_controller2_test.go b/controllers/activemqartemis_controller2_test.go index aa630564f..9a9ad2f99 100644 --- a/controllers/activemqartemis_controller2_test.go +++ b/controllers/activemqartemis_controller2_test.go @@ -183,7 +183,7 @@ var _ = Describe("artemis controller 2", func() { } candidate.Spec.Resources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ - corev1.ResourceStorage: resource.MustParse("1Mi"), + corev1.ResourceStorage: resource.MustParse("16Mi"), }, } }) @@ -287,7 +287,7 @@ var _ = Describe("artemis controller 2", func() { } candidate.Spec.Resources = corev1.ResourceRequirements{ Requests: corev1.ResourceList{ - corev1.ResourceStorage: resource.MustParse("2Mi"), + corev1.ResourceStorage: resource.MustParse("16Mi"), }, } }) @@ -312,7 +312,7 @@ var _ = Describe("artemis controller 2", func() { }, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ - corev1.ResourceName(corev1.ResourceStorage): resource.MustParse("2Mi"), + corev1.ResourceName(corev1.ResourceStorage): resource.MustParse("16Mi"), }, }, }, @@ -363,7 +363,7 @@ var _ = Describe("artemis controller 2", func() { }, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ - corev1.ResourceName(corev1.ResourceStorage): resource.MustParse("2Mi"), + corev1.ResourceName(corev1.ResourceStorage): resource.MustParse("16Mi"), }, }, }, diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 2449b83de..9a6fb151f 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -236,19 +236,20 @@ func setUpNamespace() { } func setUpIngress() { + isIngressSSLPassthroughEnabled = isOpenshift + clusterIngressHost = clusterUrl.Hostname() + ingressConfig := &configv1.Ingress{} ingressConfigKey := types.NamespacedName{Name: "cluster"} ingressConfigErr := k8sClient.Get(ctx, ingressConfigKey, ingressConfig) if ingressConfigErr == nil { - isIngressSSLPassthroughEnabled = true clusterIngressHost = "ingress." + ingressConfig.Spec.Domain } else { - isIngressSSLPassthroughEnabled = false - clusterIngressHost = clusterUrl.Hostname() ingressNginxControllerDeployment := &appsv1.Deployment{} ingressNginxControllerDeploymentKey := types.NamespacedName{Name: "ingress-nginx-controller", Namespace: "ingress-nginx"} err := k8sClient.Get(ctx, ingressNginxControllerDeploymentKey, ingressNginxControllerDeployment) + if err == nil { if len(ingressNginxControllerDeployment.Spec.Template.Spec.Containers) > 0 { ingressNginxControllerContainer := &ingressNginxControllerDeployment.Spec.Template.Spec.Containers[0] diff --git a/pkg/utils/common/common.go b/pkg/utils/common/common.go index 4e7e35148..292e8fc60 100644 --- a/pkg/utils/common/common.go +++ b/pkg/utils/common/common.go @@ -685,9 +685,9 @@ func DetectOpenshiftWith(config *rest.Config) (bool, error) { for i := 0; i < defaultRetries; i++ { isOpenShiftResourcePresent, err = discovery.IsResourceEnabled(discoveryClient, schema.GroupVersionResource{ - Group: "operator.openshift.io", + Group: "route.openshift.io", Version: "v1", - Resource: "openshiftapiservers", + Resource: "routes", }) if err == nil {