Remove kubernetes stack port_range workarounds

Closes #39546

Signed-off-by: Ryan Emerson <remerson@redhat.com>
This commit is contained in:
Ryan Emerson 2025-06-04 18:08:28 +01:00 committed by GitHub
parent 72d3063a54
commit f3a1dc4aee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,9 +67,6 @@ public final class JGroupsConfigurator {
private static final String TLS_PROTOCOL_VERSION = "TLSv1.3";
private static final String TLS_PROTOCOL = "TLS";
private static final String KUBERNETES_STACK = "kubernetes";
private static final String KUBERNETES_PATCHED_STACK = "kubernetes-patched";
private JGroupsConfigurator() {
}
@ -94,25 +91,6 @@ public final class JGroupsConfigurator {
configureDiscovery(holder, session);
configureTls(holder, session);
warnDeprecatedStack(holder);
patchKubernetesStack(holder);
}
/**
* Patch for <a href="https://github.com/keycloak/keycloak/issues/39023">GHI#39023</a> and <a
* href="https://github.com/keycloak/keycloak/issues/39454">GHI#39454</a>
*/
private static void patchKubernetesStack(ConfigurationBuilderHolder holder) {
var stackXmlAttribute = transportStackOf(holder);
if (!Objects.equals(KUBERNETES_STACK, stackXmlAttribute.get())) {
// not the kubernetes stack
return;
}
logger.info("[PATCH] Patching kubernetes stack.");
// patch port range
var attributes = Map.of("port_range", "0");
var patch = List.of(new ProtocolConfiguration("TCP", attributes));
holder.addJGroupsStack(new EmbeddedJGroupsChannelConfigurator(KUBERNETES_PATCHED_STACK, patch, null), KUBERNETES_STACK);
transportOf(holder).stack(KUBERNETES_PATCHED_STACK);
}
/**