Skip to content

Commit ef54f1c

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 5976be1 commit ef54f1c

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.6.3
37+
version: 24.6.4

bitnami/keycloak/README.md

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

689689
### Keycloak Cache parameters
690690

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

698698
### Keycloak Logging parameters
699699

@@ -869,4 +869,4 @@ Unless required by applicable law or agreed to in writing, software
869869
distributed under the License is distributed on an "AS IS" BASIS,
870870
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
871871
See the License for the specific language governing permissions and
872-
limitations under the License.
872+
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
@@ -1380,14 +1380,14 @@ externalDatabase:
13801380
## ref: https://www.keycloak.org/server/caching
13811381
## @param cache.enabled Switch to enable or disable the keycloak distributed cache for kubernetes.
13821382
## NOTE: Set to false to use 'local' cache (only supported when replicaCount=1).
1383-
## @param cache.stackName Set infinispan cache stack to use
1384-
## @param cache.stackFile Set infinispan cache stack filename to use
1383+
## @param cache.stack Set infinispan cache stack to use, sets KC_CACHE_STACK (<https://www.keycloak.org/server/all-config?q=cache-stack>)
1384+
## @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>)
13851385
## @param cache.useHeadlessServiceWithAppVersion Set to true to create the headless service used for ispn containing the app version
13861386
##
13871387
cache:
13881388
enabled: true
1389-
stackName: kubernetes
1390-
stackFile: ""
1389+
stack: kubernetes
1390+
configFile: "cache-ispn.xml"
13911391
useHeadlessServiceWithAppVersion: false
13921392
## @section Keycloak Logging parameters
13931393

0 commit comments

Comments
 (0)