diff --git a/src/keycloak/chart/templates/statefulset.yaml b/src/keycloak/chart/templates/statefulset.yaml index 0041a8d99..f270807f6 100644 --- a/src/keycloak/chart/templates/statefulset.yaml +++ b/src/keycloak/chart/templates/statefulset.yaml @@ -72,9 +72,12 @@ spec: # This will only import the realm if it does not exist - "--import-realm" - "--features=preview" + {{- if .Values.jsonLogFormat }} + - "--log-console-output=json" + {{- end }} envFrom: - secretRef: - name: {{ include "keycloak.fullname" . }}-realm-env + name: {{ include "keycloak.fullname" . }}-realm-env env: # Common configuration - name: UDS_DOMAIN diff --git a/src/keycloak/chart/values.yaml b/src/keycloak/chart/values.yaml index eea6fb1ea..106519e1a 100644 --- a/src/keycloak/chart/values.yaml +++ b/src/keycloak/chart/values.yaml @@ -61,6 +61,9 @@ devMode: true # Enable debug logging for keycloak and quarkus debugMode: false +# Enable JSON logging format for Keycloak +jsonLogFormat: true + # Enable SMTP networkPolicy and config smtp: enabled: false