Skip to content

Commit 8c98584

Browse files
committed
Improvements to Keycloak cache handling
Rename environment variables according to the Keycloak documentation and adjust some values to this. Signed-off-by: Dominic Hopf <[email protected]>
1 parent 72f3f35 commit 8c98584

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

bitnami/keycloak/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ maintainers:
3434
name: keycloak
3535
sources:
3636
- https://github.com/bitnami/charts/tree/main/bitnami/keycloak
37-
version: 24.5.1
37+
version: 24.5.2

bitnami/keycloak/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -686,12 +686,12 @@ As an alternative, you can use of the preset configurations for pod affinity, po
686686

687687
### Keycloak Cache parameters
688688

689-
| Name | Description | Value |
690-
| ---------------------------------------- | ----------------------------------------------------------------------------------- | ------------ |
691-
| `cache.enabled` | Switch to enable or disable the keycloak distributed cache for kubernetes. | `true` |
692-
| `cache.stackName` | Set infinispan cache stack to use | `kubernetes` |
693-
| `cache.stackFile` | Set infinispan cache stack filename to use | `""` |
694-
| `cache.useHeadlessServiceWithAppVersion` | Set to true to create the headless service used for ispn containing the app version | `false` |
689+
| Name | Description | Value |
690+
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
691+
| `cache.enabled` | Switch to enable or disable the keycloak distributed cache for kubernetes. | `true` |
692+
| `cache.stack` ` | Set infinispan cache stack to use, sets KC_CACHE_STACK (<https://www.keycloak.org/server/all-config?q=cache-stack>) | `kubernetes` |
693+
| `cache.configFile` | cache.configFile Set infinispan cache stack config filename sets KC_CACHE_CONFIG_FILE (<https://www.keycloak.org/server/all-config?q=cache-config-file>)| `"cache-ispn.xml"`|
694+
| `cache.useHeadlessServiceWithAppVersion` | Set to true to create the headless service used for ispn containing the app version | `false` |
695695

696696
### Keycloak Logging parameters
697697

@@ -867,4 +867,4 @@ Unless required by applicable law or agreed to in writing, software
867867
distributed under the License is distributed on an "AS IS" BASIS,
868868
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
869869
See the License for the specific language governing permissions and
870-
limitations under the License.
870+
limitations under the License.

bitnami/keycloak/templates/configmap-env-vars.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,20 @@ data:
8686
KEYCLOAK_SPI_TRUSTSTORE_FILE: {{ printf "/opt/bitnami/keycloak/spi-certs/%s" .Values.spi.truststoreFilename }}
8787
{{- end }}
8888
{{- if .Values.cache.enabled }}
89-
KEYCLOAK_CACHE_TYPE: "ispn"
90-
{{- if .Values.cache.stackName }}
91-
KEYCLOAK_CACHE_STACK: {{ .Values.cache.stackName | quote }}
89+
KC_CACHE_TYPE: "ispn"
90+
{{- if .Values.cache.stack }}
91+
KC_CACHE_STACK: {{ .Values.cache.stack | quote }}
9292
{{- end }}
93-
{{- if .Values.cache.stackFile }}
94-
KEYCLOAK_CACHE_CONFIG_FILE: {{ .Values.cache.stackFile | quote }}
93+
{{- if .Values.cache.configFile }}
94+
KC_CACHE_CONFIG_FILE: {{ .Values.cache.configFile | quote }}
9595
{{- end }}
9696
{{- if .Values.cache.useHeadlessServiceWithAppVersion }}
9797
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless-ispn-%s.%s.svc.%s" (include "common.names.fullname" .) (replace "." "-" .Chart.AppVersion) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
9898
{{- else }}
9999
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
100100
{{- end }}
101101
{{- else }}
102-
KEYCLOAK_CACHE_TYPE: "local"
102+
KC_CACHE_TYPE: "local"
103103
{{- end }}
104104
{{- if .Values.logging }}
105105
KEYCLOAK_LOG_OUTPUT: {{ .Values.logging.output | quote }}

bitnami/keycloak/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,14 +1372,14 @@ externalDatabase:
13721372
## ref: https://www.keycloak.org/server/caching
13731373
## @param cache.enabled Switch to enable or disable the keycloak distributed cache for kubernetes.
13741374
## NOTE: Set to false to use 'local' cache (only supported when replicaCount=1).
1375-
## @param cache.stackName Set infinispan cache stack to use
1376-
## @param cache.stackFile Set infinispan cache stack filename to use
1375+
## @param cache.stack Set infinispan cache stack to use, sets KC_CACHE_STACK (https://www.keycloak.org/server/all-config?q=cache-stack)
1376+
## @param cache.configFile Set infinispan cache stack config filename sets KC_CACHE_CONFIG_FILE (https://www.keycloak.org/server/all-config?q=cache-config-file)
13771377
## @param cache.useHeadlessServiceWithAppVersion Set to true to create the headless service used for ispn containing the app version
13781378
##
13791379
cache:
13801380
enabled: true
1381-
stackName: kubernetes
1382-
stackFile: ""
1381+
stack: kubernetes
1382+
configFile: "cache-ispn.xml"
13831383
useHeadlessServiceWithAppVersion: false
13841384
## @section Keycloak Logging parameters
13851385

0 commit comments

Comments
 (0)