Update HA guides to use the new ISPN config options

Closes #26776

Signed-off-by: Michal Hajas <mhajas@redhat.com>
This commit is contained in:
Michal Hajas 2024-02-05 11:19:30 +01:00 committed by Alexander Schwartz
parent 2785bbd29b
commit 80de12d59a
2 changed files with 17 additions and 39 deletions

View file

@ -53,7 +53,7 @@ include::examples/generated/keycloak-ispn.yaml[tag=keycloak-ispn-configmap]
include::examples/generated/keycloak-ispn.yaml[tag=keycloak-ispn-secret] include::examples/generated/keycloak-ispn.yaml[tag=keycloak-ispn-secret]
---- ----
. Extend the {project_name} Custom Resource with `additionalOptions` and extend the `podTemplate` as shown below. . Extend the {project_name} Custom Resource with `additionalOptions` as shown below.
+ +
[NOTE] [NOTE]
==== ====
@ -67,14 +67,11 @@ Administrators should leave those configurations untouched.
---- ----
include::examples/generated/keycloak-ispn.yaml[tag=keycloak-ispn] include::examples/generated/keycloak-ispn.yaml[tag=keycloak-ispn]
---- ----
<1> Custom cache configuration XML file definition, which includes configuration for remote or embedded {jdgserver_name} store. <1> The `name` and `key` of the ConfigMap with the {jdgserver_name} Cache configuration XML created in the previous step.
<2> The hostname and port of the remote cache {jdgserver_name} cluster. <2> The hostname and port of the remote cache {jdgserver_name} cluster.
<3> The credentials required, username and password, to access the remote cache {jdgserver_name} cluster. <3> The credentials required, username and password, to access the remote cache {jdgserver_name} cluster.
<4> Mounting the cache configuration Volume in Kubernetes. <4> The `spi-connections-infinispan-quarkus-site-name` is an arbitrary {jdgserver_name} site name which {project_name} needs for its embedded {jdgserver_name} deployment when a remote store is used.
However, matching the `jboss.site.name` with the external {jdgserver_name} deployment site name helps debugging possible future issues. This site-name is related only to the embedded {jdgserver_name} and does not need to match any value from the external {jdgserver_name} deployment.
If you are using multiple sites for {project_name} in a cross-DC setup such as <@links.ha id="deploy-infinispan-kubernetes-crossdc" />, the site name must be different in each site. If you are using multiple sites for {project_name} in a cross-DC setup such as <@links.ha id="deploy-infinispan-kubernetes-crossdc" />, the site name must be different in each site.
<5> `jboss.site.name` is an arbitrary {jdgserver_name} site name which {project_name} needs for its embedded {jdgserver_name} deployment when a remote store is used.
This site name is related only to the embedded {jdgserver_name} and does not need to match any value from the external {jdgserver_name} deployment.
<6> Defining the cache configuration Volume using the already created ConfigMap in Kubernetes.
</@tmpl.guide> </@tmpl.guide>

View file

@ -737,13 +737,17 @@ spec:
enabled: enabled:
- multi-site # <2> - multi-site # <2>
# tag::keycloak-ispn[] # tag::keycloak-ispn[]
cache:
configMapFile:
name: kcb-infinispan-cache-config # <1>
key: kcb-infinispan-cache-remote-store-config.xml # <1>
# end::keycloak-ispn[]
# tag::keycloak-ispn[]
additionalOptions: additionalOptions:
- name: cache-config-file # <1> # end::keycloak-ispn[]
value: kcb-infinispan-cache-remote-store-config.xml
# tag::keycloak-queue-size[] # tag::keycloak-queue-size[]
- name: http-max-queued-requests - name: http-max-queued-requests
# end::keycloak-ispn[]
value: "1000" value: "1000"
# end::keycloak-queue-size[] # end::keycloak-queue-size[]
- name: log-console-output - name: log-console-output
@ -763,27 +767,22 @@ spec:
secret: secret:
name: remote-store-secret name: remote-store-secret
key: password key: password
# end::keycloak-ispn[] - name: spi-connections-infinispan-quarkus-site-name # <4>
value: keycloak
# end::keycloak-ispn[]
http: http:
tlsSecret: keycloak-tls-secret tlsSecret: keycloak-tls-secret
instances: 1 instances: 1
# tag::keycloak-ispn[]
unsupported: unsupported:
podTemplate: podTemplate:
# end::keycloak[] # end::keycloak[]
# end::keycloak-ispn[]
metadata: metadata:
annotations: annotations:
checksum/config: c73adcb155290b2da36c94852649862ca6c5ceab4be2f51bde509cd07276ca3d-4832924b47210161956e3b1718daf07ff52d801545186a76c391485eaf1897d3--56f92cd9012613402e2a7a61aded0f218d077b8c6345b22922ca7bf1a5c64984-v1.27.0 checksum/config: 4ea7d5f76d813828d0306098e48de65564756d4629233b2f7125709bcac6b4dc-4832924b47210161956e3b1718daf07ff52d801545186a76c391485eaf1897d3--56f92cd9012613402e2a7a61aded0f218d077b8c6345b22922ca7bf1a5c64984-v1.27.0
# tag::keycloak[] # tag::keycloak[]
# tag::keycloak-ispn[]
spec: spec:
# end::keycloak-ispn[]
# tag::keycloak-ispn[]
containers: containers:
- env: - env:
# end::keycloak-ispn[]
- name: 'QUARKUS_THREAD_POOL_MAX_THREADS' # <4> - name: 'QUARKUS_THREAD_POOL_MAX_THREADS' # <4>
value: "200" value: "200"
# end::keycloak[] # end::keycloak[]
@ -801,13 +800,9 @@ spec:
key: password key: password
optional: false optional: false
# tag::keycloak[] # tag::keycloak[]
# tag::keycloak-ispn[]
- name: JAVA_OPTS_APPEND # <5> - name: JAVA_OPTS_APPEND # <5>
value: > value: ""
-Djboss.site.name=keycloak
# end::keycloak[] # end::keycloak[]
# end::keycloak-ispn[]
ports: ports:
# tag::keycloak[] # tag::keycloak[]
resources: resources:
@ -824,25 +819,11 @@ spec:
# exec: # exec:
# command: # command:
# - 'true' # - 'true'
# tag::keycloak-ispn[]
volumeMounts: volumeMounts:
- name: kcb-infinispan-cache-config # <4>
mountPath: /opt/keycloak/conf/kcb-infinispan-cache-remote-store-config.xml
subPath: kcb-infinispan-cache-remote-store-config.xml
readOnly: true
# end::keycloak-ispn[]
- name: keycloak-providers - name: keycloak-providers
mountPath: /opt/keycloak/providers mountPath: /opt/keycloak/providers
readOnly: true readOnly: true
# tag::keycloak-ispn[]
volumes: volumes:
- name: kcb-infinispan-cache-config # <6>
configMap:
name: kcb-infinispan-cache-config
items:
- key: kcb-infinispan-cache-remote-store-config.xml
path: kcb-infinispan-cache-remote-store-config.xml
# end::keycloak-ispn[]
- name: keycloak-providers - name: keycloak-providers
configMap: configMap:
name: keycloak-providers name: keycloak-providers