Using extension with keycloak operator 20.0.X

Hi everybody.
I want to make a quick question.
How can I add external extensions, like metrics, themes extensions, using keycloak operator 20.0.0 (quarkus)?

I hope some one can helping me.

Thanks

I don’t think this is possible with CRDs, but you can specify a custom keycloak image to the operator and build it with metric extension and themes like this:

FROM alpine:latest as metrics

RUN wget https://github.com/aerogear/keycloak-metrics-spi/releases/download/2.5.3/keycloak-metrics-spi-2.5.3.jar -O /src/keycloak-metrics-spi.jar


FROM quay.io/keycloak/keycloak:20.0.2 as builder
COPY --from=metrics /src/keycloak-metrics-spi.jar /opt/keycloak/providers
# ...
RUN /opt/keycloak/bin/kc.sh build


FROM quay.io/keycloak/keycloak:20.0.2
COPY --from=builder /opt/keycloak/lib/quarkus/ /opt/keycloak/lib/quarkus/
COPY --from=metrics /src/keycloak-metrics-spi.jar /opt/keycloak/providers
ADD --chown=keycloak:root themes/ /opt/keycloak/themes/