fix: switching to Boolean instead of boolean (#44340)

closes: #38843

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins
2025-11-20 02:53:28 -05:00
committed by GitHub
parent 4e87b1f5a0
commit 8ae3750348
2 changed files with 6 additions and 5 deletions

View File

@@ -327,7 +327,7 @@ public class KeycloakDeploymentDependentResource extends CRUDKubernetesDependent
if (!specBuilder.hasDnsPolicy()) {
specBuilder.withDnsPolicy("ClusterFirst");
}
boolean automount = keycloakCR.getSpec().getAutomountServiceAccountToken();
boolean automount = !Boolean.FALSE.equals(keycloakCR.getSpec().getAutomountServiceAccountToken());
specBuilder.withAutomountServiceAccountToken(automount);
handleScheduling(keycloakCR, schedulingLabels, specBuilder);
@@ -472,7 +472,7 @@ public class KeycloakDeploymentDependentResource extends CRUDKubernetesDependent
if (useServiceCaCrt) {
truststores += "," + SERVICE_CA_CRT;
}
// include the kube CA if the user is not controlling KC_TRUSTSTORE_PATHS via the unsupported or the additional
varMap.putIfAbsent(KC_TRUSTSTORE_PATHS, new EnvVarBuilder().withName(KC_TRUSTSTORE_PATHS).withValue(truststores).build());
}

View File

@@ -164,7 +164,7 @@ public class KeycloakSpec {
@JsonProperty("automountServiceAccountToken")
@JsonPropertyDescription("Set this to to false to disable automounting the default ServiceAccount Token and Service CA. This is enabled by default.")
private boolean automountServiceAccountToken = true;
private Boolean automountServiceAccountToken;
public HttpSpec getHttpSpec() {
return httpSpec;
@@ -391,10 +391,11 @@ public class KeycloakSpec {
this.serviceMonitorSpec = serviceMonitorSpec;
}
public boolean getAutomountServiceAccountToken() {
public Boolean getAutomountServiceAccountToken() {
return automountServiceAccountToken;
}
public void setAutomountServiceAccountToken(boolean automountServiceAccountToken) {
public void setAutomountServiceAccountToken(Boolean automountServiceAccountToken) {
this.automountServiceAccountToken = automountServiceAccountToken;
}
}