Use --verbose by default in Operator deployments

Closes #21802
This commit is contained in:
Václav Muzikář 2023-07-21 11:58:43 +02:00 committed by Alexander Schwartz
parent 6907134f17
commit 9c63cf98e7
3 changed files with 5 additions and 5 deletions

View file

@ -223,7 +223,7 @@ public class KeycloakDeployment extends OperatorManagedResource<StatefulSet> 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");

View file

@ -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);

View file

@ -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);