Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Advanced configuration
4.1. Advanced configuration Link kopierenLink in die Zwischenablage kopiert!
This chapter describes how to use Custom Resources (CRs) for advanced configuration of your Red Hat build of Keycloak deployment.
4.1.1. Server configuration details Link kopierenLink in die Zwischenablage kopiert!
Many server options are exposed as first-class citizen fields in the Keycloak CR. The structure of the CR is based on the configuration structure of Red Hat build of Keycloak. For example, to configure the https-port
of the server, follow a similar pattern in the CR and use the httpsPort
field. The following example is a complex server configuration; however, it illustrates the relationship between server options and the Keycloak CR:
For a list of options, see the Keycloak CRD. For details on configuring options, see All configuration.
4.1.1.1. Additional options Link kopierenLink in die Zwischenablage kopiert!
Some expert server options are unavailable as dedicated fields in the Keycloak CR. The following are examples of omitted fields:
- Fields that require deep understanding of the underlying Red Hat build of Keycloak implementation
- Fields that are not relevant to an OpenShift environment
- Fields for provider configuration because they are dynamic based on the used provider implementation
The additionalOptions
field of the Keycloak CR enables Red Hat build of Keycloak to accept any available configuration in the form of key-value pairs. You can use this field to include any option that is omitted in the Keycloak CR. For details on configuring options, see All configuration.
The values can be expressed as plain text strings or Secret object references as shown in this example:
The name format of options defined in this way is identical to the key format of options specified in the configuration file. For details on various configuration formats, see Configuring Red Hat build of Keycloak.
4.1.2. Secret References Link kopierenLink in die Zwischenablage kopiert!
Secret References are used by some dedicated options in the Keycloak CR, such as tlsSecret
, or as a value in additionalOptions
.
When specifying a Secret Reference, make sure that a Secret containing the referenced keys is present in the same namespace as the CR referencing it. Along with the Red Hat build of Keycloak Server Deployment, the Operator adds special labels to the referenced Secrets to watch for changes.
When a referenced Secret is modified, the Operator performs a rolling restart of the Red Hat build of Keycloak Deployment to pick up the changes.
4.1.3. Unsupported features Link kopierenLink in die Zwischenablage kopiert!
The unsupported
field of the CR contains highly experimental configuration options that are not completely tested and are Tech Preview.
4.1.3.1. Pod Template Link kopierenLink in die Zwischenablage kopiert!
The Pod Template is a raw API representation that is used for the Deployment Template. This field is a temporary workaround in case no supported field exists at the top level of the CR for your use case.
The Operator merges the fields of the provided template with the values generated by the Operator for the specific Deployment. With this feature, you have access to a high level of customizations. However, no guarantee exists that the Deployment will work as expected.
The following example illustrates injecting labels, annotations, volumes, and volume mounts:
4.1.4. Disabling required options Link kopierenLink in die Zwischenablage kopiert!
Red Hat build of Keycloak and the Red Hat build of Keycloak Operator provide the best production-ready experience with security in mind. However, during the development phase, you can disable key security features.
Specifically, you can disable the hostname and TLS as shown in the following example: