From f3d8133ba56b6159408483f2cba111945c599478 Mon Sep 17 00:00:00 2001 From: Luigi Sportelli Date: Wed, 19 Apr 2023 10:55:42 +0200 Subject: [PATCH] ENG-4776 porting operator tomcat selection --- pom.xml | 2 +- .../app/EntandoAppDeployableContainer.java | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index ce4b7ee..ee9ff93 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 7.1.0 - 7.1.3 + 7.1.6 entando-k8s-app-controller Entando K8S Controller for Entando App Deployments Entando's K8S Controller for Entando App Deployments diff --git a/src/main/java/org/entando/kubernetes/controller/app/EntandoAppDeployableContainer.java b/src/main/java/org/entando/kubernetes/controller/app/EntandoAppDeployableContainer.java index 7d5f284..e822886 100644 --- a/src/main/java/org/entando/kubernetes/controller/app/EntandoAppDeployableContainer.java +++ b/src/main/java/org/entando/kubernetes/controller/app/EntandoAppDeployableContainer.java @@ -105,11 +105,13 @@ public String determineImageToUse() { } private JeeServer determineStandardImage() { - if (EntandoOperatorSpiConfig.getComplianceMode() == EntandoOperatorComplianceMode.REDHAT) { - return JeeServer.EAP; - } else { - return entandoApp.getSpec().getStandardServerImage().orElse(JeeServer.WILDFLY); - } + return entandoApp.getSpec().getStandardServerImage().orElseGet(() -> { + if (EntandoOperatorSpiConfig.getComplianceMode() == EntandoOperatorComplianceMode.REDHAT) { + return JeeServer.EAP; + } else { + return JeeServer.TOMCAT; + } + }); } @Override