Skip to content

Conversation

@disbeliefff
Copy link

Summary

This PR adds comprehensive enhancements to the KeycloakX Helm chart to advanced Infinispan session replication, complete database credentials management, load shedding, and optimized thread management following Keycloak best practices

Key enhancements:

  • High availability session replication using configurable Infinispan cache owners

  • Database credentials management via Kubernetes Secrets

  • Built-in load shedding support to protect the cluster under high load

  • Explicit thread pool configuration for predictable resource usage

  • Templated JGroups JDBC_PING configuration for reliable node discovery

New Features Added

1. Advanced Infinispan Session Replication

infinispan:

owners:

sessions: 2

authenticationSessions: 2

userSessions: 2

offlineSessions: 2

clientSessions: 2

offlineClientSessions: 2

loginFailures: 2

2. Complete Database Credentials Management

database:

existingSecret: "keycloak-db-credentials"

existingSecretKeys:

username: "username"

password: "password"

hostname: "host"

port: "port"

database: "database"

vendor: "vendor"

3 Load Shedding

loadShedding:

enabled: true

httpMaxQueuedRequests: 1000

4 Thread Management

threads:

http:

poolMaxThreads: ""

jgroups:

maxThreads: "" 

5. Enhanced JGroups Configuration

cache:

stack: jdbc-ping

jgroups:

config: |

<config>

<TCP bind_port="7800" />

<JDBC_PING

connection_username="{{ .Values.database.existingSecretKeys.username }}"

connection_password="{{ .Values.database.existingSecretKeys.password }}"

connection_url="jdbc:postgresql://{{ .Values.database.existingSecretKeys.hostname }}:{{ .Values.database.existingSecretKeys.port }}/{{ .Values.database.existingSecretKeys.database }}"

/>

</config>

Documentation References

https://www.keycloak.org/high-availability/multi-cluster/concepts-threads
https://www.keycloak.org/high-availability/multi-cluster/building-blocks
https://www.keycloak.org/high-availability/multi-cluster/concepts

@disbeliefff disbeliefff requested a review from a team as a code owner January 5, 2026 10:02
s.stoyanov added 5 commits January 5, 2026 12:05
… database credential management

Signed-off-by: s.stoyanov <s.stoyanov@hostry.com>
Signed-off-by: s.stoyanov <s.stoyanov@hostry.com>
Signed-off-by: s.stoyanov <s.stoyanov@hostry.com>
Signed-off-by: s.stoyanov <s.stoyanov@hostry.com>
Signed-off-by: s.stoyanov <s.stoyanov@hostry.com>
@disbeliefff disbeliefff force-pushed the feature/enhanced-ha-production branch from 579a939 to eeafd1e Compare January 5, 2026 10:05
@disbeliefff disbeliefff changed the title feat: Configurable Infinispan Replication, Lload shedding, Threads Management and DB credentials via secrets, feat: Configurable Infinispan Replication, Load shedding, Threads Management and DB credentials via secrets, Jan 5, 2026
@disbeliefff disbeliefff changed the title feat: Configurable Infinispan Replication, Load shedding, Threads Management and DB credentials via secrets, feat: Configurable Infinispan Replication, Load shedding, Threads Management and DB credentials via secrets Jan 5, 2026
@disbeliefff
Copy link
Author

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant