Mac m4 JAVA_TOOL_OPTIONS=-XX:UseSVE=0

I was having trouble getting the keycloak operator to work.

Long story short, basically download the operator yaml and add env var JAVA_TOOL_OPTIONS to the yaml. I think this should be documented.

https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/26.2.0/kubernetes/kubernetes.yml

    spec:
      containers:
        - env:
            - name: JAVA_TOOL_OPTIONS
              value: -XX:UseSVE=0

You can test locally …

docker run --rm -it quay.io/keycloak/keycloak-operator:26.2.0 bash        

Result

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000ffff7b139c5c, pid=1, tid=6
#
# JRE version:  (21.0.6+7) (build )
# Java VM: OpenJDK 64-Bit Server VM (21.0.6+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# j  java.lang.System.registerNatives()V+0 java.base@21.0.6
#
# Core dump will be written. Default location: /opt/keycloak/core
#
# An error report file with more information is saved as:
# /opt/keycloak/hs_err_pid1.log
[0.010s][warning][os] Loading hsdis library failed
#

Passing JAVA_TOOL_OPTIONS works

 docker run --rm -it -e JAVA_TOOL_OPTIONS=-XX:UseSVE=0 quay.io/keycloak/keycloak-operator:26.2.0 bash