Skip to content

Commit

Permalink
Remove Keycloak JDK UseContainerSupport parameter
Browse files Browse the repository at this point in the history
The parameter `-XX:+UseContainerSupport` is no longer required for Keycloak >= v21 based on JDK v17.
JDK >= v17 has enabled the container support by default.
  • Loading branch information
Gabriel Mainberger committed Jan 24, 2024
1 parent 58a318a commit 216fe0a
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion charts/keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,15 @@ This allows you to only configure memory using Kubernetes resources and the JVM
extraEnv: |
- name: JAVA_OPTS
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS
-Djava.awt.headless=true
```
The parameter `-XX:+UseContainerSupport` is no longer required for [Keycloak >= v21 based on JDK v17](https://github.com/keycloak/keycloak/blob/release/21.0/quarkus/container/Dockerfile#L20).
JDK >= v17 has enabled the container support by default.

### Database Setup

By default, Bitnami's [PostgreSQL](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) chart is deployed and used as database.
Expand Down
1 change: 0 additions & 1 deletion charts/keycloak/ci/h2-and-ingress-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ extraEnv: |
value: /secrets/admin-creds/password
- name: JAVA_OPTS
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS
Expand Down
1 change: 0 additions & 1 deletion charts/keycloak/ci/postgres-ha-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ extraEnv: |
value: all
- name: JAVA_OPTS
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS
Expand Down
3 changes: 2 additions & 1 deletion charts/keycloakx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,15 @@ This allows you to only configure memory using Kubernetes resources and the JVM
extraEnv: |
- name: JAVA_OPTS
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.net.preferIPv4Stack=true
-Djava.awt.headless=true
```
Alternatively one can append custom JVM options by setting the `JAVA_OPTS_APPEND` environment variable.

The parameter `-XX:+UseContainerSupport` is no longer required for [Keycloak >= v21 based on JDK v17](https://github.com/keycloak/keycloak/blob/release/21.0/quarkus/container/Dockerfile#L20).

#### Using an External Database

The Keycloak Docker image supports various database types.
Expand Down
1 change: 0 additions & 1 deletion charts/keycloakx/ci/h2-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ extraEnv: |
key: password
- name: JAVA_OPTS_APPEND
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.awt.headless=true
-Djgroups.dns.query={{ include "keycloak.fullname" . }}-headless
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ extraEnv: |
key: password
- name: JAVA_OPTS_APPEND
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.awt.headless=true
-Dkubeping_namespace={{ .Release.Namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extraEnv: |
key: password
- name: JAVA_OPTS_APPEND
value: >-
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=50.0
-Djava.awt.headless=true
-Djgroups.dns.query={{ include "keycloak.fullname" . }}-headless
Expand Down

0 comments on commit 216fe0a

Please sign in to comment.