codecentric / helm-charts

A curated set of Helm charts brought to you by codecentric

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the reason for using Statefulset for Keycloak?

vishrantgupta opened this issue · comments

This is more of a discussion thread, I don't see discussion is enabled for this repo.

I see Keycloak is deployed with Statefulset https://github.com/codecentric/helm-charts/blob/master/charts/keycloak/templates/statefulset.yaml is there any particular reason why it's a Statefulset? It could be a Deployment?

Deployment as StatefulSet is necessary to support the KUBE_PING and DNS_PING JGroup discovery, which is documented here:

https://github.com/codecentric/helm-charts/tree/58a318a16a5ed220601da39fcd4e82127c3f911a/charts/keycloak#high-availability-and-clustering

It would be possible to switch from StatefulSet to Deployment with a discovery mechanism like JDBC_PING. See http://jgroups.org/manual/#_jdbc_ping