diff --git a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java index ba4d6627e9..94667bba1a 100644 --- a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java +++ b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java @@ -223,7 +223,7 @@ public class KeycloakDeployment extends OperatorManagedResource imp containerBuilder.withImagePullPolicy(operatorConfig.keycloak().imagePullPolicy()); } if (Optional.ofNullable(containerBuilder.getArgs()).orElse(List.of()).isEmpty()) { - containerBuilder.withArgs("start"); + containerBuilder.withArgs("--verbose", "start"); } if (customImage.isPresent()) { containerBuilder.addToArgs("--optimized"); diff --git a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakRealmImportJob.java b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakRealmImportJob.java index e3526d3738..f52eb7c15e 100644 --- a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakRealmImportJob.java +++ b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakRealmImportJob.java @@ -143,10 +143,10 @@ public class KeycloakRealmImportJob extends OperatorManagedResource { var override = "--override=false"; - var runBuild = (keycloak.getSpec().getImage() == null) ? "/opt/keycloak/bin/kc.sh build && " : ""; + var runBuild = (keycloak.getSpec().getImage() == null) ? "/opt/keycloak/bin/kc.sh --verbose build && " : ""; var commandArgs = List.of("-c", - runBuild + "/opt/keycloak/bin/kc.sh import --optimized --file='" + importMntPath + getRealmName() + "-realm.json' " + override); + runBuild + "/opt/keycloak/bin/kc.sh --verbose import --optimized --file='" + importMntPath + getRealmName() + "-realm.json' " + override); keycloakContainer .setCommand(command); diff --git a/operator/src/test/java/org/keycloak/operator/testsuite/integration/KeycloakDeploymentTest.java b/operator/src/test/java/org/keycloak/operator/testsuite/integration/KeycloakDeploymentTest.java index 5bb206fa1f..0ff70602fe 100644 --- a/operator/src/test/java/org/keycloak/operator/testsuite/integration/KeycloakDeploymentTest.java +++ b/operator/src/test/java/org/keycloak/operator/testsuite/integration/KeycloakDeploymentTest.java @@ -521,7 +521,7 @@ public class KeycloakDeploymentTest extends BaseOperatorTest { .list() .getItems(); - assertThat(pods.get(0).getSpec().getContainers().get(0).getArgs()).containsExactly("start", "--optimized"); + assertThat(pods.get(0).getSpec().getContainers().get(0).getArgs()).containsExactly("--verbose", "start", "--optimized"); } catch (Exception e) { savePodLogs(); throw e; @@ -549,7 +549,7 @@ public class KeycloakDeploymentTest extends BaseOperatorTest { .list() .getItems(); - assertThat(pods.get(0).getSpec().getContainers().get(0).getArgs()).containsExactly("start", "--optimized"); + assertThat(pods.get(0).getSpec().getContainers().get(0).getArgs()).containsExactly("--verbose", "start", "--optimized"); assertThat(pods.get(0).getSpec().getImagePullSecrets().size()).isEqualTo(1); assertThat(pods.get(0).getSpec().getImagePullSecrets().get(0).getName()).isEqualTo(imagePullSecretName);